On each side of the equation, write the number of gallons divided by the cost. One of these quantities will be x. Solve for x. If you don't get it, you are not thinking, and you need more insults to shake you up a bit. Or go baaack.