You have some backtracking that seems unnecessary. You need not circle back to Munich unless you've already bought that roundtrip flight or have another motive. If you book a "multi-city" ticket, it would let you fly home from Budapest or Prague. How long do you have for this route? If timing gets tight, then Ljubljana seems like a detour that can be first to cut.
Since your travel is primarily in Austria, Czech Rep, Slovakia, and Hungary, which are the specific countries covered by the European East Pass, then I'd get that pass for your time there. 2nd-class prices range from $194 to $334 for 5 to 10 travel days within a one-month window. Does not cover inside the German or Slovenian borders, which are short parts of your trip, and does not cover buses, but I doubt that you'll need many buses. It works on fast trains such as Austria's RailJet with no extra fee required (reservations are optional).
Hotels can be your main budget expense, but 4 sharing a room fare better. See other sleeping cheap tips at http://www.ricksteves.com/travel-tips/sleeping-eating.