Revs up dan down

Are you sure you didn’t tear a crankcase ventilation hose or something, while you were checking out the car?

Or maybe you forgot to reconnect a vacuum hose?

Here’s some other possibilities for P0171 and P0174

Low fuel pressure
Exhaust leaks upstream of the oxygen sensors
Intake leaks
Brake booster hose
etc.

see i never got thouse codes till i replace the old maf…

@mwkarrick‌

Was the new MAF an exact replacement for the old MAF?

Is the replacement MAF a new part, or a rebuilt?

Perhaps the replacement is simply defective

It would explain the P0171 and P0174

The fact that the engine runs well with the new MAF . . . but runs poorly with the old MAF . . . confirms the old MAF was faulty

The fact that the P0171 and P0174 weren’t present with the old MAF makes me think the replacement MAF may be a dud

With all these rebuilt parts out there, it’s not that rare of a situation to run into a bad “new” part

the part i got was Remanufactured maf

i got it from autozone