Calculate the weight of CO having the same number of Oxygen atoms as are present in 22g of CO2.
22 g CO2 = 22/molar mass = 22/44 = 0.50 mole CO2.
Since 1 mole CO2 contains 6.022E23 molecules of CO2, 0.50 mole will contain just half that number of CO2 molecules (3.011E23) and that number of atoms (6.022E23).
So 1 mole CO should contain the same number of oxygen atoms.
1 mole CO (28 grams) contains 6.02E23 molecules and 6.022E23 atoms oxygen.