Question 395422
you have two unknowns:   C=gallons used in city driving and H=gallons used in highway driving
so you will need two equations to solve the two unknowns
--
eq1  gallons used:    C+H=51 
eq2  miles driven: 25*C+40*H=1800
-
solve eq1 for H:   H=51-C and substitute in eq2
25*C+40*(51-C)=1800  solve for C
25C-40C+2040=1800 
2040-1800=15C
C=240/15=16gallons used
--
they want to know how many miles were driven in the city

25*C=25*16=400 miles