Step-by-step explanation:
Given, John had $30
after riding 5 rides, He had $20
( Let's subtract the balance and the balance he had after ride )
$(30 - 20)
$10
Therefore, Each ride costs = $10 ÷ 5
(dividing 10 and 5, we get 2)= $2
Hence, It took $2 for a ride.
Hope it helps. If it helps don't forget to like and mark me.