You have to make two matches next to them. The fireflies will only fly away when all of them have their wings completely open at the same time. You can also use the shovel to hit the firefly twice to get it to open its wings fully if need be. I hope this helps.