So to figure this out, first we need to write the decomposition reaction
2KClO3 --> 2KCl + 3O2
From this equation we see that it takes 2 moles of KClO3 to make 3 moles of O2The molar mass of KClO3 is 122.5g.
So now let's turn grams of KClO3 into moles of O2.
30.6g x 1mol KClO3 / 122.5g x 3 moles O2 / 2 mol KClO3 = 0.375 moles O2
At STP, we know 1 mole of any gas has a volume of 22.4L. So, we just multiply the moles of oxygen by 22.4L and we get 8.4L