moles = mass / molecular weight
Here we are told that the initial mass, m1, is 200 mg (or 0.2 g). And we can find the molecular weight of CO2 on wikipedia (or similar) – this is 44.01 g/mole (according to wikipedia). Therefore:
n1 = initial number of moles = 0.2 g / 44.01 g/mole = 0.0045 moles
Now we are removing 10^21 molecules from this. This number, expressed in units of moles, can be calculated from the following:
# molecules / # molecules per mole = # moles
Note: # molecules per mole = Avogadro’s number = 6.02*10^23 molecules/mole
Therefore:
(10^21 molecules) / (6.02*10^23 molecules/mole) = 0.0017 (this is the number of moles we are removing).
Therefore:
Number of moles remaining = initial number of moles (n1) – number of moles removed
Number of moles remaining = 0.0045 moles – 0.0017 moles
Number of moles remaining = 0.0028 or 2.8 E-3 moles
Hope this helps!