To find the cost of 9 gallons of gas, we first need to determine the cost per gallon from the information given.
We know that when 12 gallons were purchased, the cost was $39.36. We can calculate the cost per gallon as follows:
\[ \text{Cost per gallon} = \frac{\text{Total cost}}{\text{Number of gallons}} = \frac{39.36}{12} \]
Calculating the cost per gallon:
\[ \text{Cost per gallon} = 3.28 \]
Now that we know the cost per gallon, we can calculate the cost of 9 gallons:
\[ \text{Cost for 9 gallons} = \text{Cost per gallon} \times \text{Number of gallons} = 3.28 \times 9 \]
Calculating the total cost for 9 gallons:
\[ \text{Cost for 9 gallons} = 29.52 \]
Thus, the cost for 9 gallons of gas is $29.52.
The answer is:
\[ \boxed{29.52} \]