is it the trany or speed control senor the cars rpms go up to 4000 and races on 1997 Ford Expedition

when driving but comes back down when you hit the peddle

2 answers
sounds like idle air control or poss vaccum leak. do you have a ck eng light on?
possible IAC issue