Alex drives from City A to City B, a distance of 240 miles. On his way back, he drives half the distance at 60 miles per hour and the other half at 40 miles per hour. How long does it take Alex to complete the round trip, in hours? Let's think step by step and output the final answer within \boxed{}.
user