The correct equation to show the relationship between the number of gallons of gas (g) and the total amount spent (s) is:
s = 3g
This means that the total amount spent (s) is equal to the cost per gallon ($3) multiplied by the number of gallons (g).