Answer :
F= first car
S = second car
F+S =55
F= 55-S
20f+40s=1700
Using substitution method add the value of F to second equation
20(55-s)+40s=1700
1100-20s+40s=1700
1100+20s=1700
20s=600
s=30
So second car consumed 30 gallons of gas; first car consumed 25 gallons
S = second car
F+S =55
F= 55-S
20f+40s=1700
Using substitution method add the value of F to second equation
20(55-s)+40s=1700
1100-20s+40s=1700
1100+20s=1700
20s=600
s=30
So second car consumed 30 gallons of gas; first car consumed 25 gallons