2004 Mazda Mazda6 weak power-running rough

Engine light on in 6 cylinder Mazda 6 Sport Wagon, 2004. Weak power and runs rough.
Error code P0174
System too lean (bank 2) P0175
System too rich (bank 2)
This is the second time this has happened in past 6 years. I only put on about 3000 miles a year tops. Last time, I had coils, wires, and plugs replaced for the whole engine.
Mechanic said the part where the coils is located was “full of junk”. I assume he meant tree crap. Not sure how that would cause the problem…
What is causing this error code? Could the coil and plug have been fine but, the crap caused some kind of problem? If same now, maybe just need labor cost to clean out and rerun engine?

Two things
You need a different mechanic
You don’t drive your car enough

What Is The Cause Of P0174?

  • Dirty or faulty mass airflow sensor
  • Vacuum leaks – PCV hoses, vacuum hoses, intake manifold gasket.
  • Weak fuel pump
  • Clogged or dirty fuel injectors
  • Clogged fuel filter
  • Exhaust leak
  • Faulty oxygen sensor
  • Faulty air-fuel ratio sensor

On a car this old, my guess vacuum leak.
Not driving it enough may have allowed the injectors to foul.