Let x be the speed of eastbound train
The eastbound train travels 20 miles per hour slower than the westbound train.
so the speed of westbound train is x + 20
Distance = speed * time
Time = 4 hours
Distance traveled by each bound train = 4x
Distance traveled by westbound train = 4(x+20)
Two trains are 800 miles apart
4x + 4(x+20) = 800
4x + 4x + 80 = 800
8x + 80 = 800
Subtract 80 from both sides
8x = 720
Divide both sides by 8
x = 90
The speed of east bound train is 90 miles per hour