By TRAIN do not bother booking advance-just buy on the day the special single-thats about 15/16 eur (Pay equiv. in HUF the other way).
It can be done cheaper-take train to KOmarno (change off EC in NOve Zamky OR use direct Regiojet)-walk over bridge to HU-side, change money on the way-dozens of places, see TEsco hypermarket on HU side and station is beside-MAV runs 2 trains/hr to BUd, 1 slow S-train and one ''fast''. Walk of about 20 mins-there are also occasional HU citybuses.
Also: take EC as far as Sturovo, take bus to Esztergom on HU side-connects most times direct), then either train or bus(along HU side of Danube) to Bud.
There are also scores of coaches=buses, best are by StudentAgency=Regiojet. Of course all fares liable to change by that time.
IF you happen to be over 65, in fact the trip via the acrossthebridgelinks can be done all free for the trains-in SK from 62, but get yourself a free customercard (foto needed) first, then get ticket, in HU-from 65-just show EUR-ID.