Suppose trains leave from NY for AT every 20 mins starting at 1:00 am, and trains leave AT for NY every 30 mins starting at 1:10 am. If it takes each train 10 hours to travel from one city to the other, how many trains traveling from AT to NY are passed by the train that leaves NY at 1 pm and arrives in AT at 11 pm?
So every 30 mins:
- 1:10 am
- 1:40 am
- 2:10 am
- ...
- 12:40 pm
- 1:10 pm
- ...
- 10:40pm
In 10 hours from 12:40 pm > 10:40 pm since 10hrs = 600 mins 600/30 = 20 trains passes when that single train travels from NY to AT from 1pm to 11pm.
Using an equation. Given the problem parameters every train AT→NY that leaves from the time the NY→AT train leaves (and until it arrives) qualifies.
The decimal time notation for $30$ mins is $0.5$ (hour), and 1:10 is $1$ hour + $\dfrac{10}{60}$ hour, or $\dfrac{7}{6}$ hour. We can write the "$t^{th}$ train number leaving" equation, that gives the departure time for all trains AT→NY
$$\dfrac{7}{6}+0.5\cdot t$$
Then we want to know how many trains leave between $13$h ($1$pm) and $23$h ($11$pm), that is all the $t$ that meet
$$13 \le \dfrac{7}{6}+0.5\cdot t\lt 23$$
or $$\dfrac{71}{3}\le t\lt \dfrac{131}{3}$$thus $$t=\dfrac{131}{3}-\dfrac{71}{3}=20$$