Q: P0171 and P0174 Codes on 2001 Nissan Pathfinder

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
I had the service engine light come on and took it to the dealership a month back. They said it was a P0174 issue and would cost be 800$ to fix. I indicated that I would like to ensure that was a "real" issue and would come back later. As I drove out of the lot, the service engine light went off!! Great and just what I had been reading on the websites.

Now,a month later the service engine light came back on, but there also seems to be a pinging sound (rattle). so, tool the car back again into the dealership and they say P0171 and P0174 codes both show up and it will be $900 to fix!!

Really frustrated and confused ... Any help appreciated.
(2) Answers
You don't want to hear my story. I got the same codes, ignored them for a while. I didn't want to pay $ 600 dollars for a MAF sensor. Found them online for $100. Changed it got new codes. Oxygen sensors, cat converters. Changed the sensor, went away. Converter codes stayed, dealer said the converters were bad ($3200 repair) Bought them online for $450, had the dealer install them for $500. Very tricky to install.
Here is some info on these codes:
What is the shop recommending for repairs?