Let [tex]w[/tex] be the speed of the westbound train, [tex]e[/tex] eastbound
Westbound is 10mph faster than eastbound:
w = 10 + e
After two hours, they're 400 miles apart:
400 = 2w + 2e
Solving,
[tex]e = w-10[/tex]
[tex]400 = 2w + 2(w-10) = 2w + 2w -20[/tex]
[tex]420 = 4w[/tex]
[tex]w=105[/tex] mph
That's the answer. That means the eastbound train is going 95 mph, so they're separating at 200 mph, so 400 miles apart after two hours. Check.