A train travels from City A to City B at an average speed of 60 miles per hour. On the return trip, due to construction, the train's average speed decreases to 40 miles per hour. If the round trip takes a total of 5 hours, how far is City A from City B? Let's think step by step and output the final answer within \boxed{}.
user