A family has two cars. The first car has a fuel efficiency of 20 miles per gallon of gas and the second has a fuel efficiency of 30 miles per gallon of gas. During one particular week, the two cars went a combined total of 1300 miles, for a total gas consumption of 50 gallons. How many gallons were consumed by each of the two cars that week?

If the two cars went x and y miles, respectively, then since gals = miles/mpg,

x+y = 1300
x/20 + y/30 = 50
now finish it off

f + s = 50 gal ... 2 f + 2 s = 100 gal

(f * 20) + (s * 30) = 1300 ... 2 f + 3 s = 130 gal

subtracting equations ... s = 30 gal

substitute back to find f