Wayner is correct. It’s a matter of preference. If you love trains then that is the way to go. Or if you hate airports then the train is the way to go. But for reference.
Prague Old town to the main station (by taxi) is about 10 minutes.
Me at least, especially in a new station, I arrive no less than 30 minutes early find the platform, validate the ticket, find the new platform when it changes, get my reserved seat before anyone else sits in it, etc…..
The fastest train is 7:30 hours
The time from Keleti to the Opera House by taxi or metro is 15 minutes but throw in another 10 to call and find your taxi. Same would be true about buying metro tickets.
So, door to door = 8:35 hours
Now for me personally, I will have my morning coffee and croissant first so add 25 minutes for an even 9:00 hours.
Prague Old Town to the airport by taxi is about 30 minutes.
Pre Arrival time 2:00 hours (to be honest I never arrive more than 1.5 hours early)
Flight time 1:10 hours
Deplane, luggage, passport control, walk to taxi stand: 30 minutes
Order taxi, wait for taxi: 5 minutes (really is that fast they way they have it set up)
Ride to Opera House 30 minutes on average (it can be half that if there is no traffic). Metro will take you that long too.
So, door to door = 4:45 hours
Now for me personally, I will have my morning coffee and croissant first so add …. Well nothing … I get it in the airport. So, still 4:45.
Cost? Well the train is about $30 last time I checked, the flight $20 to $120. Then you might spend another $40 extra per couple for the longer taxi ride if you fly.
While the plane is at least 4 hours faster, the time options are limited; right now one flight a day with departure time varying by the day of the week, but anything from morning to late night. There are a lot more train options, but few with the 7:30 time, many take more than 8 hours.
The view? To be honest I have never taken the train from Prague to Budapest; but I have been on few trains with much to look at along the way.
So each has its good and bad and in the end you cant do wrong.