Do it like this….
diphosphorous pentoxide is P2O5
from this periodic table
www.chemicalelements.com/
the atomic mass of P is 30.97
the atomic mass of O is 16.00
so the mass of 1 P2O5 = 2×30.97 + 5×16.00 = 141.9
and the mass of the P in P2O5 = 2 x 30.97 = 61.9
so the fraction of P in P2O5 = 61.9 / 141.9
finally
15.5 g P2O5 x (61.9 g P / 141.9 g P2O5) = 6.76 g P