Two trains are traveling towards each other from two stations that are 500 miles apart. Train A departs from Station X at a speed of 60 miles per hour, and Train B departs from Station Y at a speed of 40 miles per hour. If both trains start at the same time, after how many hours will the two trains meet? Let's think step by step and output the final answer within \boxed{}.
user