What is wrong with my 1998 Honda Accord?

Its a 4 cylinder not a V6.
While driving on the highway going 65 the car randomly hit the RPMS to 7000-8000 red line and then went back down then went back up. Obviously i had to take the foot off the gas.

Then it wouldn't acceleratw past 40 then youd hear clunks and the car pushing forward a bit. I had to turn the car off and on so it wouldn't do it as much
What do I do? I'm 150 miles away from my house and don't have AAA.

If its thetransmission sslippin What can i do? I'm alone and scared. Its 2am and i'm broke.

Best thing to do would be to buy or find someone who has an OBD II reader. It will give you a code. Look up the code and it will tell you exactly what the problem is. I'd recommend this before taking it to a shop because a lot of shops will screw you over if you don't know what the problem is.

Hope it works out

1998 Accord 4CYL has the F23A1 motor. When that motor won't go past 4k it is usually indicative of the VTEC spool assy. This is what it looks like off the motor
What is wrong with my 1998 Honda Accord - 1

Check the wires connected to this unit. It will be on the left side of the engine near the dist cap, close to the top of the engine. Make sure the connector is clicked on. Might have to limp it home

Also to add in. The car shifts fine. Its an auto and i have a check engine light

Transmission is shot.

No fluid or burnt clutches in transmission