Blaise helped the DE and although he cast few hexes, he found an empty compartment on the train and pretended to be among the students when it became evident that the DA were going to be successful in their defense of the trio. He has mostly been attempting to maintain his cover at Hogwarts although there are some students who are aware of his loyalties.
Melanie didn't return via train. Her father escorted her to the gates since he knew of the planned attack on the train.