PLEASE HELP 10 POINTS + BRAINLIEST

A freight train averages 40 mi/h traveling to its destination with full cars and 50 mi/hr on the return trip with empty cars. What is the train’s average speed for the entire trip? Round to the nearest tenth.

Please show work