You are getting to your hotel in Prague at 4:45pm. But you get to choose how.
The Ryan flight if it leaves at 2pm and arrives at 3:15pm so you get to your hotel about 4:45pm? About $110 a ticket with checked bags.
The train straight through you could leave at a reasonable time and be at your hotel by 4:45pm. About $36 a ticket. (09:30 to 16:15 train)
By car the trip from Budapest to Prague has several interesting stops. But the cost for a private transfer with a couple of stops will be about $700. Maybe about the same if you rent a car because of the drop off charge. Look at Daytrip.com for some of the obvious stops. There are also some interesting castles and towns along the way, but Lake Balaton is in the wrong direction and the wrong time of year. CK Shuttle will arrange a private transfer too. About the same cost as DayTrip but they might show other options for stops. Six hours of driving with one 90-minute stop along the way you aren’t getting to your hotel before 4:45pm I am guessing.
If you do it by train with a stop, the obvious stop would be Brno for lunch (09:30 to 13:30 train) and maybe a tour for a few hours. Actually, a great choice for a stop. https://youtu.be/8otgwOVcXOk?si=v0zp-sl_-d9bNO6s Brno is about halfway so about 4 hours to Brno and then another 3 hours to Prague. It’s on the track from Budapest to Prague so it’s not a detour. If you just stopped only for lunch and a 2 hour walk in Brno's old district, you aren’t getting to your hotel before 8pm.
With the cost of the car transfer being so high I guess I would take the train to Brno, arrive for lunch and try and set up something with a tour (maybe even a "free" walking tour). Then, spend the night in some special little hotel in the old district and make lemonade out of the long trip lemon. With an early start the next morning, you could be in Prague by noon. You lose 8 awake hours in Prague. Prague for me was a 2 or 3 night city at most and Brno looks as good in different ways … I think for my next trip to Prague I am sold on the idea.
The entire trip you can buy on OBB but it might cost you a lot. Or, to Brno you could buy on MAV or the Czech Rail site and from Brno to Prague you could buy on the Czech rail line. Which ever is cheaper. That would save having to pay OBB for full fare tickets (but check OBB to see how their prices compare). I am guessing about $70 a ticket with MAV and / or Czech Rail, and over $120 with OBB.