posted by Kelly on .
Omar owns a car and a moped. He can afford 12 gal of gasoline to be split between the car and the moped. Omar's car gets 20 mpg and, with the fuel currently in the tank, can hold at most an additional 10 gal of gas. His moped gets 100 mpg and can hold at most 3 gal of gas. How many gallons of gasoline should each vehicle use if Omar wants to travel as far as possible on the 12 gal of gas? What is the maximum number of miles that he can travel?
let the number of gallons to go into the moped be x.
let the number of gallons for the car be 12-x
x<=3 and 12-x <=10
x<=3 and x>=2
distance he can go by moped is 100x miles
distance he an go by car is 20(12-x) = 240 - 20x
so the total distance he can go is 80x+240 miles
but the largest x we can have is x=3
so he can go 80*3+240 = 480 miles
this of course is the distance he can go using only the 12 gallons, it doesn't say how much gas there was in the car to begin with.
The answer is 21