The first step in solving this question is to split the journey into 2 parts. In the first part of the journey, miles are covered at a speed of 40 mph. In the second part the journey 5 miles are covered at a speed of 60 mph.
The equation to compute the time of a journey given the speed and distance is where is the time, is the speed and is the distance.
The time for the first part of the journey is calculated as shown below,
.
The time for the second part of the journey is calculated as follows,
.
The total time is the sum of the times taken to cover each part of the journey and is calculated as shown below,
The time to cover the journey is a third of an hour or 20 minutes.