# Comparing the time in the time-distance problem

The question is:

Two trains start at point A and B and travel towards each other at a speed of $50$km/hr and $60$Km/hr respectively. At the time of meeting the second train has traveled $120$ km more than the first train. Now the distance between them is:

Now I did manage to solve it with a little help and its like this:

First Train starting from $A$:

$t = x/50$

Second Train starting from $B$:

$t = (120+x) / 60$

Comparing $A$ and $B$ we get $x$ and then using the value of $x$ we can calculate the total distance between them which is $1320$.

My question is why are we comparing $A$ and $B$. The only reason we would compare them is if they were equal. I don't understand how time could be equal when the two trains meet. I would appreciate it if someone could kindly clarify this concept.

-