In case of Zurich-Budapest route you have a few solutions to consider. Though it a bit depends on whether you want to travel by overnight EuroNight train or daytime RailJet and whether you have a rather definite date, nevertheless:
1) Both for an overnight and daytime direct trains there are Spar tickets starting from 39 euro (seats + for EuroNight train from 49 euro couchette or 69 euro sleepers), but the number of such ticket are limited, so it makes sense to buy them in advance. In your case ways to do it: a) ask you friend to visit SBB ticket counter (sale starts 90 days in advance) and simply buy such discounted tickets. Obviously they won't be sold out on the first day and maybe even first week, but during summer it makes sense to buy them as early as possible; b) you can yourself visit
SBB Ticket Shop and under 'Trips to Europe', choose 'Tickets', enter Zurich-Budapest. You can't buy ticket to Hungary right away, but it will be like purchase by email, in 48 hours SBB replies with fare info or 24 hours with booking request. So you can do that and then just get your ticket later (they should be able to mail it by regular mail or you can pick it up already in Switzerland at the station). Alternatively SBB also offers by phone booking (including such Spar tickets to Hungary)
2) Don't bother asking a friend or working it out with SBB and rely on a combination of tickets you can book online yourself. The trick is that you can book (and print yourself at home) ticket from first Austrian station (in this case it will be Feldkirch) till Budapest using Austrian Railways website international tickets eShop (we even have a guide how to book international tickets -
http://europetrainsguide.com/Advice/How-to-Buy-Train-Tickets/Austria-OeBB.html ). Feldkirch-Budapest ticket, as you can yourself see, start also from 39 euro. Then two weeks before your departure from Zurich you just need to visit SBB website and buy domestic discounted
SuperSaver ticket Zurich-last Swiss station before Feldkirch (in this case Buchs SG, start from only 13,6) for the same train you already have ticket (Feldkirch-Budapest), thus meaning that you won't even need to get off train, but till Buch SG use one ticket, while from Feldkirch the other. Or alternatively, you can just buy Zurich-Feldkirch ticket before departure for 22 CHF (standard fare) and don't bother with SuperSaver at all.
And just to give you a better understanding about range of fare we are talking above, full fare (in this case Globalpreis) one-way Zurich-Budapest is 84.9 euro
How about the return?
In case of Switzerland-Hungary it's not the best solution, though SBB does offer for return tickets '
Plan + Spar Hungary'. If the route was vice versa (Hungary-Switzerland), then return ticket option was much more tempting option, since tariff is not mirror one and from Hungary it's much cheaper.
...Vienna to Salzburg and Salzburg to Zurich.
Well, in case you have fixed date and time, then for Vienna-Salzburg trip you can book (via
OeBB domestic ticket eShop) domestic Austrian Sparschiene tickets (from 19 euro). Or alternatively, in case you won't know date and time in advance, just travel with
WestBahn instead, it's new private operator on the line. Their full fare for Vienna-Salzburg is just 23,8 euro and no in advance purchase needed, since you can even buy such ticket on the train. While with Salzburg-Zurich you once again need to stick with OeBB and mentioned international tickets eShop, their in case of in advance purchase you can get Spar tickets for as low as 29 euro