First, we need to calculate the moles of P2O5:
moles of P2O5 = mass of P2O5 / Molar mass of P2O5
when the molar mass = 2*31 + 5*16 = 142 g/mol
by substitution:
moles of P2O5 = 0.51 g / 142 g/mol
= 0.0036 moles
to know how many molecules = moles P2O5 * Avogadro's number
= 0.0036 * 6.02 x 10^23
= 2.17 x 10^21 molecules P2O5
when each molecule of P2O5 has 2 P atoms and 5 O atoms = 7 atoms
∴ the total atoms = 2.17 x 10^21 * 7atoms = 1.5 x 10^22 atoms