Using distance = rate * time formula we can solve this problem.
We know the distance 40 miles and we know the time 2 hours.
Plug in the values.
40 miles = 2t hours
Solve for t.
Divide both sides by 2.
40 miles / 2 = 2t hours / 2
20 miles / hour = t
So, the answer is 20 miles per hour.