Since not so long time ago MAV (Hungarian railways) actually started to sell certain international tickets online, among those are special discounted tickets for connection Hungary-Romania (called "Fortuna" ticket). So now with those you can travel from Budapest to Buchurest for as low as 29 EUR (seats), 39 EUR (6 berth couchette) or 59 EUR (3 bed sleeper=like RIC carriages in Ukraine). The only inconvenience is that as of now interface is in Hungarian (
http://www.mav-start.hu/imap.php?mid=romania), but is not that difficult, so google translator will cope with that. But such discounted tickets are in limited number, so you will have to purchase those some time in advance to ensure that they are still available. Regular one-way ticket Budapest-Buchurest cost 50.4 EUR (+ potential reservation), this one can be purchase any time, even 5 minutes before train departure.
From Debrecen there is no direct rail connection to Buchurest and MAV doesn't sell online Debrecen-Buchurest ticket either. They do only for connections from Debrecen to Carei, Oradea and Satu Mare. From all those towns you can catch direct domestic trains to Bucurest (roughly cheapest tickets from either of 3 will cost you app. 80 RON). But if you need to go to Constanta after all, then it is cheaper to purchase one through ticket Carei/Oradea/Satu Mare-Constanta instead of to separate once till Buchurest and from Buchurest till Constanta.
All the timetables and fares for Romanian domestic routes can be foun here -
www.mersultrenurilorcfr.ro , CFR (Romanian railways) also sell domestic tickets online + you get a chance to save up to 13% while buying in advance (
http://www.cfrcalatori.ro/1565)