When the reaction takes place in the air the oxygen out of the air is not weighed before at the products side. That results in a mass difference. When the reaction occurs in a flashbulb the oxygen out of the air in the flashbulb is weighed at the products side, so there is no mass difference.
Work Step by Step
When a strip of magnesium burns it reacts with oxygen (g) to produce magnesiumoxide. Magnesiumoxide is the white powder stated in the question. When this reaction happens in the air, the involved oxygen is taken out of the air. This means that it is not weighed before the reaction occurs. So in this case the products side weighs less that the reactants side. In other words ,the magnesiumoxide weighs more than the magnesium. When the reaction takes place in a flashbulb, the involved oxygen is taken out of the air in the flashbulb. This means that the air is weighed before the reaction occurs together with all the other elements of the flashbulb. At the end the magnesiumoxide stays in the same flashbulb, and when it is weighed it weighs as much as before. So the masses of the products side and the reactants side are equal and there is no mass difference.