If a small cake equals $20 then you can remove that completely from the cost.
$27.50-$20=$7.50
Now, you are left with the three toppings; walnuts, raspberries, and sprinkles. Since you know you have three toppings you can divide the $7.50 by three
$7.50/3= $2.50
The answer to the problem is that each topping equals $2.50.