In cents, before you buy the candy, you have 25q, + 10d +5n. The numbers represent the amount of money each coin is worth, and the variable represents how many of each coin there are.
The amount you spend on candy: 4(25) + 5(10) + 6(5) = 180.
Therefore, after you purchase the candy, you have 180 - 25q + 10d + 5n.
I hope this helps!