By car. It's bit more money. But, you got freedom of choice.
From Zagreb there are two trains that day that take around 6 hours so it would be a lot better to take bus to Zagreb and then the train.
Direct train at 16.20 from Zagreb Glavni Kolod (station) gets in to Budapest at 22.19.
I've found them on bahn.de, and also seen that from opatija you have an incredible number of changes, some journeys are 20 hours!
-:- Message from TripAdvisor staff -:-
This topic has been closed to new posts due to inactivity. We hope you'll join the conversation by posting to an open topic or starting a new one.
To review the TripAdvisor Forums Posting Guidelines, please follow this link: http://www.tripadvisor.com/pages/forums_posting_guidelines.html
We remove posts that do not follow our posting guidelines, and we reserve the right to remove any post for any reason.