They both got a ticket to the Ferris wheel which was 5 each, so two tickets would be $10
The cost of the snow cone was 3.50, added tot he tickets the total cost is now $13.50
They paid 12.75 plus the 6 dollar certificate for a total of 18.75.
The cost of the cotton candy was 18.75 - 13.50 = $5.25