The change in velocity is 40 mph - 0 mph = 40 mph.
The change in time is 5 seconds.
Therefore, the acceleration is 40 mph / 5 seconds = 8 mph/s.