Answer : The molecular formula of the sample is, 
Solution :
If percentage are given then we are taking total mass is 100 grams.
So, the mass of each element is equal to the percentage given.
Mass of X = 15.0 g
Mass of Y = 75.0 g
Mass of Z = 10.0 g
Molar mass of X = 45.0 g/mole
Molar mass of Y = 150 g/mole
Molar mass of Z = 30.0 g/mole
Step 1 : convert given masses into moles.
Moles of X = 
Moles of Y = 
Moles of Z = 
Step 2 : For the mole ratio, divide each value of moles by the smallest number of moles calculated.
For X = 
For Y = 
For Z = 
The ratio of X : Y : Z = 1 : 1.5 : 1
To make in the whole number we multiply the ratio by 2, we get:
The ratio of X : Y : Z = 2 : 3 : 2
The mole ratio of the element is represented by subscripts in empirical formula.
The Empirical formula = 
The empirical formula weight = 2(45.0) + 3(150) + 2(30.0) = 600 gram/eq
Now we have to calculate the molecular formula of the compound.
Formula used :


Molecular formula = 
Therefore, the molecular of the sample is, 