Well, in either leg you don't really need to prebook anything. Anyway most of the trains on your segments doesn't require reservation, so you can just purchase your ticket already at the station before departure.
Vienna-Bratislava: return EURegio ticket cost 14 EUR, but it's valid only for 4 days, thus in case you aren't coming back Bratislava-Vienna within this timing, then it makes sense to opt for the bus option, especially since one-way bus ticket is much cheaper, only 7,7 EUR (+available discounts for >60 or <26). You can check timetable/fare either here (
http://www.slovaklines.sk) or here (
http://www.eurolines.at/en/home/).
Bratislava-Kosice: regular one-way train ticket cost 17,82 EUR, while ticket+obligatory reservation for a bit faster InterCity train 20 EUR in total. Both you can actually purchase online via
ZSSK website. While with direct buses on route Bratislava-Kosice you actually travel longer (comparing to train) and pay more (comparing to standard train fare).
Kosice-Budapest: there are two direct trains (morning and evening), return ticket cost only 20 EUR (one-way actually more expensive than return in this case). And as far as we know, there is no direct bus connection between Kosice and Budapest.
If you not very happy with either morning or evening option, then it's also possible to travel Kosice-Budapest during the day via Slovenske Nove Mesto/Sátoraljaújhely, but that's will take longer and cost more.