For a 7 to 8 day trip you are probably wise to just do Prague and Budapest and split the time between the two. In that case, fly from Prague to Budapest.
What quality hotel are you looking for?
One of my favorite hotels is in Prague: The Ventana https://www.ventana-hotel.net/ Its about 150m from Old Town, but buffered just enough to be a little quieter.
For Budapest
I think the best general all around hotel is the 4star: K&K Opera https://www.kkhotels.com/en/budapest/hotel-opera Its also very convenient as the M1 Metro line is about 150 feet from the front door. The M1 also known as the Millenium Line is the oldest underground on the continent of Europe and because of its size is more like an amusement park ride than a big city subway. It connects the river to the city park and there are Top Ten sights between the two extremes, so very convenient. It also crosses two Tram Lines which will get you to what the M1 cant.
If you want to go upscale there are a number of good 5star hotels in Budapest.
Four Seasons https://www.fourseasons.com/budapest/ always rated as one of the top 2 or 3 hotels in Europe. But not well connected and will require a bit more walking.
Or the Ritz Carlton http://www.ritzcarlton.com/en/hotels/europe/budapest
Or the Kempinski https://www.kempinski.com/en/budapest/hotel-corvinus/
Both are both fairly well located for getting around. But not as good as the K&K. Of the two the Ritz is nicer.
For astonishing history, and opulence that's hard to beat anywhere in Europe, there is the Boscolo NY Palace, its a bit far from things, but there is a tram out front that will take you to the M1 Metro line or Buda: https://www.dahotels.com/new-york-palace-budapest/
Then there is the often overlooked Corinthia. One of my favorites. A bit removed, but serviced by a tram line to the M1: https://www.corinthia.com/en/hotels/budapest