Answer: Suppose x represents the distance traveled in the city, and y represents the distance traveled on the highway. We can create a system of equations based on the given information:
x + y = 100 (total distance traveled is 100 miles)
x/20 + y/45 = 3 (total time taken is 3 hours)
To solve for x, we can use the first equation to express y in terms of x:
y = 100 - x
Then we can substitute this expression for y in the second equation:
x/20 + (100 - x)/45 = 3
Next, we can simplify the equation by multiplying both sides by the least common multiple of the two denominators (900):
45x + 20(100 - x) = 3 * 900
Simplifying this equation gives:
45x + 2000 - 20x = 2700
25x = 700
x = 28
Therefore, the truck traveled 28 miles in the city, and 100 - 28 = 72 miles on the highway.
Explanation: