Cheapest option for you is to purchase two sets of tickets:
1) Oradea-Budapest return (full fare 29.6 euro, ticket valid for one month). There are discounted 21 euro return tickets, but those valid only for 4 days, thus not really suitable to your plans. No point to break ticket via border, since one way Biharkeresztes-Budapest cost 3890 HUF (app.14 euro).
2) If you will stay in Wien less than 4 days, then just purchase in Budapest so called tourist ticket (Kirándulójegy) Budapest-Wien return (valid 4 days), without Wien city transport it cost 25 euro, with 2 days of Wien city transport - 31 euro. On the way back just show both tickets (return part of your Oradea-Budapest and return of you Budapest-Wien) to the conductor.
If you plan to stay in Wien more than 4 days, then the best thing is to purchase discounted one way ticket Budapest-Wien for 13 euro and Wien-Budapest for 19 euro. First ticket your can buy either in Budapest at the ticket counter (at least 3 days before your travel) or online from MAV website (
http://www.mav-start.hu/eticket/nemzetkozi_e_ticket.php , interface is in Hungarian). Wien-Budapest one way discounted can be bought from OeBB website -
https://ticket.oebb.at/bin/frame_ticket.pl?ticket=jticket.pl&LANG=EN