We'll use variables to represent the speeds of the eastbound and westbound trains.
x will represent the speed of the eastbound train.
y will represent the speed of the westbound train.
The eastbound train is 16 mph faster than the westbound train. An equation can be made from this:
![x - y = 16](https://tex.z-dn.net/?f=x%20%20-%20y%20%3D%2016)
Subtraction is used, because it represents the difference in distances between the two trains if they travel the same direction.
After 4 hours, the trains are 800 miles apart. An equation can be made from this:
![4x + 4y = 800](https://tex.z-dn.net/?f=4x%20%2B%204y%20%3D%20800)
Addition is used, because the trains are heading in opposite directions, which means their distances from the starting point are added together.
Set the two equations up vertically:
![x - y = 16](https://tex.z-dn.net/?f=x%20-%20y%20%3D%2016)
![4x + 4y = 800](https://tex.z-dn.net/?f=4x%20%2B%204y%20%3D%20800)
We will use elimination to solve for x.
Multiply the entire first equation by 4 so that the coefficients for y will be opposite numbers:
![(x - y = 16) \times 4 = 4x - 4y = 64](https://tex.z-dn.net/?f=%28x%20-%20y%20%3D%2016%29%20%5Ctimes%204%20%3D%204x%20-%204y%20%3D%2064)
![4x - 4y = 64](https://tex.z-dn.net/?f=4x%20-%204y%20%3D%2064)
![4x + 4y = 800](https://tex.z-dn.net/?f=4x%20%2B%204y%20%3D%20800)
Combine the two equations together to cancel out y:
![8x = 864](https://tex.z-dn.net/?f=8x%20%3D%20864)
Divide both sides by 8 to get x by itself:
![x = 108](https://tex.z-dn.net/?f=x%20%3D%20108)
The speed of the eastbound train is
108 mph.