Hi Carla, the journey between Budapest and Salzburg should take about six hours, as long as you catch a direct service rather than one of the more frequent trains via Vienna. $15 does sound very cheap. The best ticket I could find was £64 with Rail Europe. As always, Seat 61 is a good source of information for rail travel in Europe.
Best,
Amy