Given that the weight ratio (w/w) of H2 to O2 is 1:4.
Let the mass of H2 present in the mixture be w g. Then, the mass of O2 present will be 4w g.
The molar mass of H2 is 2 g mol−1 and the molar mass of O2 is 32 g mol−1 .
Number of moles is calculated as the ratio of given mass to the molar mass .
Number of moles of H2 (nH2) =Molar mass of H2Mass of H2=2w
Number of moles of O2 (nO2) =Molar mass of O2Mass of O2=324w=8w
Now, let us find the molar ratio of H2 to O2:
Molar ratio=nO2nH2=8w2w=2w×w8=14=4:1.
Therefore, the molar ratio of the two gases in the mixture is 4:1.