Equal weight of methane and hydrigen are mixed in an empty container at 25°C. The fraction of the total pressure exerted by hydrogen is

molar mass CH4 = 16

molar mass H2 = 2
Assume any number for the mass of samples. Let's say 16 g.
Then mols CH4 = 16/16 = 1
mols H2 = 16/2 = 8
mol fraction CH4 = 1/9
mol fraction H2 = 8/9

pCH4 = XCH4*Ptotal
pH2 = XH2*Ptotal

XH2 = 8/9