Mazda cx-9 starting issue

Mazda Cx-9

I have a 2011 Mazda CX-9. It’s having a hard time starting. It will turn over but won’t start. It will start right up in the morning after setting over night but if you stop somewhere, it takes a while to start back up. It will turn over but not start. It had a P0171 and a P0174. Which are lean codes. I checked the vac hoses, mass air flow sensor and cleaned the throttle body. The car has almost 300k on it and has been great up until recently. Today it started bogging way down when trying to accelerate. It normally drive fine once it starts, no bogging or stalling. I’m stuck. We’re looking at getting something new. Just trying to make it past the holidays. Any help would be greatly appreciated and I can try to give more info if needed.
 
Back