Two trains, Train X and Train Y, depart from stations P and Q respectively and travel towards each other. Train X travels at a speed of 90 kilometers per hour, and Train Y travels at a speed of 70 kilometers per hour. After a certain period of time, when they meet, Train X has traveled 40 kilometers more than Train Y. What is the distance between stations P and Q? Let's think step by step and output the final answer within \boxed{}.
user