This sounds like an awesome trip! I've been to these five cities and love three of them, like one and am "meh" on the fifth. My count is you have 16 days on the ground, is that right? I think you have enough time to do this, although part of the equation is how fast you like to travel, who/how many you will be with and what you want to see.
I think priority should be given to Vienna, Budapest and Prague, which are the standouts (in my opinion) of this list. My memory is that Budapest is a bit more spread out than the other two, so you will want to take that into consideration in doling out the days. But I think three full days in each city is a good start, although you have time to add another day to one or two cities...
Especially if you take time away from Munich and/or Salzburg. I would take from Salzburg the city. I've just never had a great experience there, and I think more than a day/two nights there will leave you searching for something to do. Again, I know I am pretty much alone on my Salzburg Isn't Great Island, but that's how I feel. HOWEVER, if you were to get out of Salzburg and into the hills - that's a different story. Hallstatt was a highlight of the trip I took with my sister; however, that was in 2010 and I hear Hallstatt can be pretty overrun. I'm sure there would be similar towns in the Salzkammergut you could visit, but I haven't personally been and so leave the suggestions to those who have.
I like Munich, I've enjoyed Munich, but I don't feel like it has the same level of attractions as the other top three. You could probably get away with your arrival day and then two full days - if you are staying in the city. However, again, there are some great day trips around Munich. Dachau has been mentioned. I'll put in my vote for the Mad King's Castles, which I know aren't everyone's stein of beer but I enjoyed going and the countryside was beautiful - even in the rain.
That's my two cents. You seem to mainly be asking if this trip is doable (yes), if your order makes sense (it does) and if you should fly between Budapest and Prague (you should, RyanAir is crap but it will get you there in one piece, just read the fine print about baggage carefully - I did not and literally paid for it - but I liked WIzzAir). If you want to know what to see or do in each of these places, that's a different answer, but one I and I know others would be more than happy to answer.