During diffusion substances move from the denser medium (meaning where there is more of the substance) to less dense medium (meaning where there is less of the substance).
From the equation above the reacting ratio of KClO3 to O2 is 2:3 therefore the number of moles of oxygen produced is ( 4 x3)/2 = 6 moles since four moles of KClO3 was consumed
mass=relative formula mass x number of moles
That is 32g/mol x 6 moles =192grams