With a backfire along with a P0300 code, I would check mechanical things first; condition of spark plugs, coil packs, vacuum leaks, and compression. It is possible that whatever is causing the misfire code is causing the O2 sensor code. If all that checks out, then chase down the O2 sensor problem....IF there is a mechanical problem, it is likely in bank 2....(drivers side)...along with the O2 sensor code.
If you have a backfire in the exhaust; you have unburnt fuel entering the exhaust, from what I mentioned above most likely. That needs to be addressed first. If its thru the intake, its almost definitely a mechanical issue in all probability.