Question 165956
Let x rate of train 1
Let y rate of train 2

then x-y=20

distance = 5x+5y=500
then

  {{{x+y=100}}}
  {{{x-y=20}}}

adding equations we have:

2x=120 x=60 and y=x-20=40

so rate of the 1st train is 60mph
   rate of the 2nd train is 40mph