I would think that a five year old would enjoy seeing a real castle.
After looking through the Austrian Rail website, I can see advance purchase discount tickets from Austria to other locations in Europe, outside of Austria (Venice, etc) but none within Austria, like the German Sparpreis tickets. I tried to see if you could just go across the river to Freilassing, Germany, and get a Europa-Spezial Österreich fare to Vienna, but the express trains, for which those tickets are valid, don't stop in Freilassing. You could go half an hour west to Traunstein, Germany, from which you could use a Europa-Spezial fare (€58 for two), but it would cost at least €28 to get to Traunstein (€86, total) so you might just as well stay in Salzburg from which the full fare to Vienna is €100 for two (child is free).
They are currently renovating the Salzburg Hbf and the main building is closed. To get to the tracks, you have to go around either side of the building. The ticket counter and automats are in a small building to the right side (looking from the front) of the station building. See the map here (in German).
Update: I found how you could get advance-purchase tickets from the German Rail website for Freilassing to Salzburg for €58 for two! Put in Freilassing to Wien with a via as Traunstein. They will sell you a ticket Freilassing to Traunstein by IC, Traunstein to Salzburg by regional train, and Salzburg to Vienna by RailJet (RJ). Of course that adds about 1½ hr to the trip, but you save €42 (less €2,10 pP from Salzburg to Freilassing). Freilassing is a German town across the river from Salzburg, about an 8 min ride by S-Bahn or regional train from the Salzburg Hbf.