#### Answer

The speed of the first car is 50 miles per hour.
The speed of the second car is 54 miles per hour.

#### Work Step by Step

Let X represent the speed of the the first car.
The speed of the second car is X + 4.
After 5 hours, the first car is 5 $\times$ X miles right from the point where it started.
After 5 hours, the second car is 5 $\times$ (X + 4) miles left from the point where it started.
Their distance after 5 hours is the distance between the point in the right and the point in the left. Since this distance equals 520 miles, we set up the following equation:
5 $\times$ X + 5 $\times$ (X + 4) = 520
5X + 5X + 20 = 520
10X + 20 = 520
10X = 500
Divide both sides by 10.
X = 50
The speed of the first car is 50 miles per hour.
The speed of the second car is X + 4 = 50 + 4 = 54 miles per hour.