Respuesta :

The g and the d are given to you in the problem. 

The first number is the amount of gallons and the second is the amount it costs. 

Also your first two equations should be multiplied, not divided.