Excuse my disdain.
"Disdain" the feeling that someone or something is unworthy of one's consideration or respect; contempt.
Seriously? Over a train ride? And one wonders why the world is so screwed up.
The OP will be taking the train, and that’s great.
If it were my trip, my logic would be like this.
My favorite hotel in Prague is the Hotel Ventana; in Budapest my favorite is the K&K Opera. You just cant do better for quality, comfort or location than these two hotels.
Checking train schedules and flight times I see I have a choice between arriving before noon or after 4pm. I love my time on vacations so I would choose to save a half day and fly. Of course, flying will cost more. Its about 60 euro more for the plane ticket and I am going to guess another 25 euro on taxi fares. So those 5 extra hours in Prague would cost me 85 euro more for one or 145 euro more for two traveling together.
7:15 AM Taxi from the K&K to the airport (35 minutes)
7:50 AM Check in 1.5 hours before flight time (eat breakfast in the airport)
9:20 AM Czech Air departs
10:45 AM Czech Air arrives
11:15 AM Getting off plane and making your way to the taxi stand (30 min) = 11:15 am
11:40 AM Taxi to the hotel (25 minutes)
Total = 4:25
8:20 AM Breakfast at the hotel (45 minutes)
9:05 AM Taxi from the K&K to Nyugati Station (5 minutes)
9:10 AM Arrive 30 minute before train time (assuming you have a ticket and don’t have to use the ticket machine to retrieve your ticket ordered on line)
9:40 AM EC train departs
4:07 PM Arrives
4:22 PM Getting off train and making your way to the taxi stand (15 min)
4:27 PM Taxi to the hotel (5 minutes)
Total = 8:07