Call the rate of speed of train B = B.
Call the rate of speed of train A = B-20
Do that because the problem said A's rate is 20 mph less than B's.
D=rt for both, and the t is the same.
Train A: 
Divide both sides by B-20, so
Train A: 
Train B: 
Divide both sides by B.
Train B: 
t is the same in both cases, so set the equations equal to each other.

Cross multiply.

Subtract 290B from both sides.

Divide both sides by -100.

Train B's rate = B = 58 mph.
Train A's rate = B-20 = 58-20 = 38mph
If you need help understanding math so you can solve these problems yourself, then one on one online tutoring is the answer ($30/hr). If you need faster solutions with guaranteed detailed answers, then go with personal problem solving ($3.50-$5.50 per problem). Contact me at fcabanski@hotmail.com