I just returned from all those places. My favourites were Budapest and Prague.
I spent 6 nights in Budapest, 4 nights in Vienna, 5 nights in Prague, 1 night in Cesky Krumlov, 1 night in Salzburg, and 3 nights in Munich.
It was easy and very doable to take the train from Budapest to Vienna and then from Vienna to Prague. The trip between Vienna and Prague is a little longer, though--5 hours, if I recall correctly.
One of our best days was our travel day between Prague and Cesky Krumlov. We booked the Lobo Shuttle and paid a little extra to have the driver stop at 2 castles along the way. One was Castle Hluboka-by far the prettiest and most fairy-tale-ish of all the castles/palaces we saw on the exterior (although the interior was clearly decorated by Gaston's family (from Disney's Beauty and the Beast)). The other was Divci Kamen, a ruin near Cesky Krumlov. Seeing it involves a fairly easy hike of about 6-7 km round trip, but it's well worth it, in my opinion. Cesky Krumlov was lovely and well worth the overnight we spent there. It is closer to Salzburg than Vienna is, too, I believe. We stayed overnight at Pension Lobo (with a 10% discount for also using their shuttle), and their driver took us to Salzburg the next day. After Salzburg, we took the train to Munich (it's a short train ride).
(If you do decide to go to Prague and are looking for a hotel recommendation, I absolutely loved the place we stayed--the Hotel Questenberk.)