If we call the efficiency of the first car as x and the efficiency of the second car as y, from the sentence "the sum of their fuel efficiencies was 60 miles per gallon.", we have the following equation
The distance travelled by a car is given by the product between the efficiency and the amount of gas consumed, therefore, the combined distance travelled is given by the sum of the products between the efficiency and the respective amount of gas consumed. The first car consumed 20 gallons of gas and the second consumed 15 gallons of gas, this means we have the following equation
Now, we have a system with two variables and two equations
If we multiply the first one by 15 on both sides, we're going to have
If we subtract the first equation from the second, we get a new equation only for x
The efficiency of the first car is 25 miles per gallon.
Using our x-value on any of the previous equations give to us the y-value
The efficiency of the second car is 35 miles per gallon.