Final answer:
To find the total number of miles driven, we use the formula distance = speed x time for each part of the trip and solve the equation to find the distance. The total number of miles driven is 120 miles.
Step-by-step explanation:
To find the total number of miles driven, we need to calculate the distance for each part of the trip. Let's assume the original distance is 'x' miles.
Using the formula distance = speed x time, we can calculate that the time taken for the first part of the trip is x/20 hours.
The second part of the trip is twice the original distance, so it is 2x miles. The time taken for this part of the trip is (2x/40) hours.
The total time taken for the trip is 4 hours. So, we have the equation: x/20 + 2x/40 = 4.
Solving this equation, we get x = 40 miles.
Therefore, the total number of miles driven is 40 miles + 2(40 miles) = 120 miles.