Let:
x = Number of rides
Total money spent = $6.00 + $0.50x
Since you have $22.00 to spend at the fair on rides and admission:
[tex]\begin{gathered} 6+0.5x\leq22 \\ \text{solving for x:} \\ 0.5x\leq22-6 \\ 0.5x\leq16 \\ x\leq\frac{16}{0.5} \\ x=32 \end{gathered}[/tex]