Your O2 sensor is the sensor sensing the problem, it shouldn't be the cause of the problem. If you do a gearchatter.com search and read the FSM page it'll show you the diagnostic aids and typical problems that cause the code.

GearChatter.com :: View topic - DTC P0172 or P0175

GC has all the FSM pages up and wide open which is why I aim you there. It gives you the description and understanding of what and why things are happening, then gives you suggestions on how to fix it.