Mass = Moles x GFM
mass = 30g so;
30 = mol x GFM
To calculate the GFM, you require a data booklet or similar.
Mine tells me that the GFMs are:
H: 1 H₃ so 3 x 1 = 3
P: 31 P so 1 x 31= 31
O:16 O₄ so 4 x 16 = 64
GFM = 64 + 31 + 3 = 98
30 = 98 x mol
mol = 30 / 98
mol = 0.31 mol