From Budapest to Salzburg, it is 5-1/2 hours on the train, which goes through Vienna. I would rather go to Salzburg in the Alpine countryside than Vienna, just another big city, a too clean and proper version of Budapest. From Salzburg, it would make sense to head south to Lubjliana, then Croatia, then back to Budapest. Google Rick Steves rail maps.