This queston is not of Algebra. It is of chemistry.
You have to work with the chemical formula of the compound, the atomic and molar masses and use proportions.
1) PH3:
element atomic mass number of atoms total mass
P 31 g/mol 1 31 g/mol
H 1.0 g/mol 3 3.0 g/mol
------------------
molar mass 34 g/mol
2) proportions
372 g H / x = 3.0 g H / 34 g PH3
=> x = 372g H * 34 g PH3 / 3.0 g H = 4216 g PH3
Answer: 4216 g