recall your d = rt, distance = rate * time.
let's say the first train is running at a rate of "r", and thus the second train is going at a rate of " r + 20 ".
So, the first one left at 1pm, the second one left at 3pm, 2 hours later, by the time they met, at 9pm and the second one overtook the first one, the first one has been going for 8hours, whilst the second one has been going for 6hours then.
Notice also, that by the time they meet, the distance each covered by then, is exactly the same, otherwise they wouldn't meet, let's say they covered a distance "d" each.
[tex]\bf \begin{array}{lcccllll}
&distance&\stackrel{mph}{rate}&\stackrel{hours}{time}\\
&------&------&------\\
\textit{first train}&d&r&8\\
\textit{second train}&d&r+20&6
\end{array}
\\\\\\
\begin{cases}
\boxed{d}=8r\\
d=6(r+20)\\
--------\\
\boxed{8r}=6(r+20)
\end{cases}
\\\\\\
8r=6r+120\implies 2r=120\implies r=\cfrac{120}{2}\implies r=60[/tex]
how fast is the second train going? well, is going r + 20.