I'm sorry but the solution you proposed was a bit hard to follow, so I'll just post my solution: we convert "2 and 1/2" to a single fraction:
[tex]2+\dfrac{1}{2} = \dfrac{4}{2}+\dfrac{1}{2}=\dfrac{5}{2}[/tex]
So, we know that 5/2 gallons cost 60 dollars, which means
[tex]\dfrac{5}{2}g=60[/tex]
To find the cost of a single gallon, we have to solve the equation for g:
[tex]g = 60\cdot \dfrac{2}{5} = 24[/tex]