2002 Mercury Grand Marquis runs rough after exiting the highway

My car will run rough after I exit the highway. I push the pedal the engine will try to die but if I put my foot on the gas hold it there the engine will stay running untill I try to move then it acts like its out of gas if I keep it floored it will eventually start to move and pick up speed the whole time it wants to back fire

OK. Did you have a question?

I’m at loss as to what is causing the problem. I have a code reader and its giving me a p0113 intake air temp sensor. When I hit the code connect its telling me the mass air sensor connector need replaced. My thinking is the mass air sensor is broke. Could that idea hold any water of am I spinning my wheels . Thank you