$25 is her total amount so you need to subtract the $8 that she paid for her ticket with.
The answer to that subtraction is $17.
With $17, you divide by $3.25 (price of candy) to get the number 5.2. Except, you can't buy a small bit of a candy, so you would be able to buy 5 in total.