Tom and Jessica are going to Disneyworld. Snacks are EXPENSIVE there. They each got a Mickey ice cream, and Jessica also got cotton candy. Tom only had S9, so Jessica paid for the rest, which was S4. The ice cream cost $5 each, what was the cost of the cotton candy? Write an equation to represent the word problem and solve it. (Show all of your steps)

Let's represent the cost of the cotton candy as C.

Since Tom paid S9 and Jessica paid S4, the total cost is S9 + S4 = S13.

Tom and Jessica each got a Mickey ice cream, which cost $5 each. Therefore, the cost of the ice cream for both of them is 2 * $5 = $<<2*5=10>>10.

The total cost, including the ice cream and Jessica's cotton candy, is $10 + C = $13.

To solve for C, we have to subtract $10 from both sides of the equation:
$10 + C - $10 = $13 - $10,
C = $3.

Therefore, the cost of the cotton candy, C, is $3.