NEED HELP PLEASE On level 48 of Fairy Mix 2

How do you get rid of the fireballs inside the squares of different colors??? Can anyone help me please . I always get the amount needed for the different colors but then still have the fireballs