You can
put this solution on YOUR website!Let

= highway miles driven
Let

= in-town miles driven
given:
(1)

mi
(2)

gallons
---------------------
Note that (miles)/(miles/gallon) = (miles) x (gallons/mile) = gallons
I have 2 equations and 2 unknowns, so it's solvable
(2)

Multiply both sides by

(2)

Now multiply both sides of (1) by

and subtract (1) from (2)

Plug this back into (1)

1400 miles were highway miles
check answer:
(2)

OK
You can
put this solution on YOUR website!t = town miles
c = country miles
t + c = 1800
t/24 + c/40 = 51 gallons.
multiply both sides of equation by 24*40 to get:
40*t + 24*c = 51*40*24
this becomes:
40t + 24c = 48960
t + c = 1800
subtract c from both sides of equation to get:
t = 1800-c
substitute 1800-c for t in first equation to get:
40*(1800-c) + 24c = 48960
simplify to get:
72000 - 40c + 24c = 48960
subtract 48960 from both sides of equation and add 40c to both sides of equation and subtract 24c from both sides of equation to get:
16c = 23040
divide both sides of equation by 16 to get
c = 1440
solve for t from c + t = 1800 to get:
t = 1800 - 1440 = 360
replace t with 360 and c with 1440 in gallons equation to get:
360/24 + 1440/40 = 15 + 36 = 51 gallons.
you drove 360 town miles and 1440 country miles.