System of Equations
Let's make:
x = Number of gallons consumed by the first car
y = Number of gallons consumed by the second car
The first car has a fuel efficiency of 15 miles per gallon and the second has a fuel that gives 40 miles per gallon.
The total miles traveled by the first car is 15x and the total miles traveled by the second car is 40y.
The total of miles traveled by both cars is 15x + 40y and it's given as 1975 miles, thus:
15x + 40y = 1975
Divide by 5:
3x + 8y = 395 (1)
Now for the second condition, the total of gas consumption was 65 gallons, thus:
x + y = 65 (2)
We'll use the method of elimination. Multiply (2) by -3 and add to (1):
3x + 8y = 395 (1)
-3x - 3y = -195
------------------------
5y = 200
Divide by 5:
y = 40
We use (2) to solve for x:
x = 65 - y
x = 65 - 40
x = 25
The first car consumed 25 gallons and the second car consumed 40 gallons