I'm no attorney and I am hopelessly honest so I have never done it (I would buy the RT or ride the train), but these are all individual legs so what ever happens on that RT leg wont affect anything else. Since its the return you would not be showing up for I cant see how they could hold you liable or punish you for missing a flight.
As for the days, if you make any changes you have to do more research because discount carriers don't always fly the same route at the same price every day.
With just a little research you could come up with other combinations including Prague or Vienna or ....... I'm just a big fan of Budapest I knew about some of the flights so I could find them fast. I use Google Flights to do the searching.
Your Milan return trip I don't think is bad. Its movement in the correct direction. Just split your time coming and going to see Milan so that way the trip home is a little easier.
As for plane vs train I don't have absolutes, but everything else being the same I figure:
Plane:
Getting to airport 45 min
Arrival at airport 2 hours early
Flight time
1 hour late and getting bags
45 minutes to town
So that's 4.5 hours plus flight time (if it were Budapest I would say 4 hours and if it were Heathrow I would say 6 hours)
Train
1 hour to get to the station plus a little time to find the right track, etc.
30 minutes at the back end to get to the hotel
So that's 1.5 hours
The difference is 3 hours longer by plane, so I will take a 1.5 hour flight (total 6 hours) over a 6 hour train ride (total 7.5 hours). If its a train station I am familiar with I can shave 30 minutes off the train time. But I prefer sitting at a restaurant or a bar in an airport to sitting on a train.