So.. the two trains, are 400 miles apart, their speeds differ by 10, so one train is faster than the other.. .let's say train A is faster than train B, by 10mph
so if train A has a speed rate of "r", then B has a rate of "r - 10"
after train A has beeng running for 4hrs, it has travelled a distance "d"
train B has travelled also for 4hrs, they're both 400 miles apart, and travelling towards each other, so the total distance travelled by both is 400miles
so after 4hours B has travelled the slack from 400 and "d", namely 400 - d
recall your d = rt --> distance = rate * time
solve for "r", to find the speed of the faster train A
what's the speed of B? well, B's rate is r - 10