math
posted by daniela on .
Frank's car can travel 30 miles per gallon of gas. Janet's car can travel 20 miles per gallon of gas. Frank and Janet drive their own cars and they leave for a trip at 8.00AM on Friday. They arrive at their destination at 2.00AM the next day. Saturday, after driving at an average speed of 40 miles per hour for the trip. The total amount of money spent on gas for the two cars together was $ 165.00 How much did each gallon of gas cost?

Their trip takes 30 hours. If they average 40 mph, the trip length is 1200 miles.
Let X be the cost of a gallon of gas.
165.00 = [(1200/30) + (1200/20)]*X
= (40 + 60 gallons)* X ($/gallon)
Solve for X