P0171 and P0174 indicate that both bank 1 and bank 2 are to lean, ie that there is to much O2 for the amount of fuel.
Some possible solutions include:
•The MAF (Mass Air Flow) Sensor is dirty or faulty
Note: The use of "oiled" air filters may cause the MAF to become dirty if the filter is over-oiled. There is also an issue with some vehicles where the MAF sensors leak the silicone potting material used to protect the circuitry.
•There could be a vacuum leak downstream of the MAF sensor
•Possible cracked vacuum or PCV line/connection
•Faulty or stuck open PCV valve
•Failed or faulty oxygen sensor (sensor 1)
•Sticking/plugged or failed fuel injector
•Low fuel pressure (possible plugged/dirty fuel filter!)
•Exhaust leak between engine and first oxygen sensor.
Noting that you have the code on bith banks, then the same problem is causing the fault to occur on both banks. This makes it a common problem to both banks. I would go looking for an air leak after the MAF, or a dirty fuel filter.