In 100 g of mixture, the mass of hydrogen and oxygen will be 20 and 80 g respectively.
The number of moles of hydrogen are n=202=10.
The number of moles of oxygen are n′=8032=2.5.
The mole fraction of hydrogen is 1010+2.5=0.8.
Partial pressure of hydrogen is 0.8×P=0.8×1=0.8 bar.