Imagine you're on the first train. since you're moving away from second train at 70mph, and that train is moving away from you at 80mph, in total that other train for you is moving away at 150mph (as you are stationary inside the train).
if the two trains are moving apart at 150mph, then to be 600 miles apart it will take 600/150 hours, which you can calculate :)