The volume of 1 mol of O2 at STP is is 22.4L
Therefore, 5L of O2 at STP is equivalent to (1 mole/22.4 L) x 5 L = 0.2083 mol of O2
From the balanced equation, 3 moles of O2 are produced by heating 1 mole of Mg(ClO3)2
Therefore, 0.2083 mol of O2 is produced by (1/3) x 0.2083 = 0.0694 mol of Mg(ClO3)2.
Molar mass of Mg(ClO3)2 = 191.32 g/mol
Therefore, the mass of Mg(ClO3)2 required is 0.0694 mol x 191.32 g/mol = 13.28 g