To solve such problems we should remember that "equal number of moles of all the elements contain equal number of atoms".
(i) Let us first convert 4 grams of calcium into moles. We have been given that the atomic mass of calcium is 40 u, so 1 mole of calcium is `40` grams.
Now, `40 g` of calcium `= 1` mole
So, `4 g` of calcium `= 1/40 xx 4` mole
`= 1/10` mole
Now, `1/10` mole of calcium will have the same number of atoms as `1/10` mole of neon. So, we should now convert `1/10` mole of neon into mass in grams.
(ii) The atomic mass of n eon is `20u`, so 1 mole of neon will be equal to 20 grams.
Now, `1` mole of neon `= 20 g`,
So, `1/10` mole of neon `= 20 xx 1/10` g
`= 2 g`
Thus, 2 grams of neon will contain the same number of atoms as 4 grams of calcium.