#### Answer

The speed of the second car was 55 miles per hour.

#### Work Step by Step

Let X represent the speed of the second car.
The second car overtook the first car 5 hours and 20 minutes after the second car left the town. Since the second car left the town 2 hours after the first car left, the first car traveled for 2 hours more. So, it traveled for 7 hours and 20 minutes.
5 hours and 20 minutes = 5$\frac{1}{3}$ hours.
7 hours and 20 minutes = 7$\frac{1}{3}$ hours.
Since the second car overtook the first car, the distance they both traveled is the same. So, we can set up the following equation:
40 $\times$ 7$\frac{1}{3}$ = X $\times$ 5$\frac{1}{3}$
40 $\times$ $\frac{22}{3}$ = X $\times$ $\frac{16}{3}$
Divide both sides by $\frac{16}{3}$.
40 $\times$ $\frac{22}{3}$ $\div$ $\frac{16}{3}$ = X
40 $\times$ $\frac{22}{3}$ $\times$ $\frac{3}{16}$ = X
$\frac{40 \times 22}{16}$ = X
X = 55
The speed of the second car was 55 miles per hour.