I will show you with detailed work for NaCl, but follow the same procedure for the rest of the compounds.
Molar Mass - Find the molar mass of the Na and the Cl and add them together
Na - 23
Cl - 35.5
Add those numbers together 23 + 35.5 = 58.5 g/mol
Moles in 1 tsp:
The mass measured in 1tsp of NaCl was 18 g. To calculate the amount of moles you take the mass measured and divide it by the molecular weight.
18/58.5 = 0.3077 mol
Moles of each element:
To find the moles each element in the compound you multiply the moles of 1 tsp by the number of atoms of the element in the compound
Na - 1 in NaCl
Cl - 1 in Na Cl
so take 0.3077 * 1 = 0.3077 moles Na (and Cl in this case)
Atoms of each:
take the number of moles calculated and multiply that by Avogadro's number(6.023x10^23) for the number of molecules
So for both Na and Cl:
0.3077 * 6.023x10^23 = 1.853x10^23 atoms for both Na and Cl