The direct variation between the total cost c and the number of gallons g of the gas may be expressed as the following,
c = kg
where k is the constant of variation. In this item, it is the cost of gasoline per gallon which is $1.89. Thus, the final variation equation is,
c = 1.89g