step 1; calculate the number of moles of each element (moles =% composition / molar mass)
that is P = 43.64 / 30.974 = 1.41 moles
O = 56.36 / 15.999= 3.52 moles
then find the mole ratio by diving both mole with smallest number of mole
that is P = 1.41/1.41 = 1 mole
O= 3.52 /1.41 = 2.5 moles
multiply by both mole ratio by 2 to remove the decimal
p= 1 x2 = 2 moles
O= 2.5 x2 = 5 moles
therefore the empirical formula = P2O5
molecular formula is calculated as follows
(P2O5) n = 284 g/mol
{(30.974 x2) + (15.999x5)}n= 284 g/mol
141.943n= 284 g/mol
divide both side by 141.943
n=2
therefore the molecular formula = (P2O5)2 = P4O10