Hii there !
The reaction accompanying production of water in this case would be -
[tex]\green{ \underline { \boxed{ \sf{2H_2+O_2\longrightarrow 2H_2O}}}} [/tex]
Thus ,by observing the reaction, we can conclude that 2 mole of Hydrogen [tex](H_2 )[/tex]react with 1 mole of oxygen[tex](O_2)[/tex]to produce 2 mole of water [tex](H_2O)[/tex]
Now,
To produce 1 moles of water.
Moles of Oxygen[tex](O_2)[/tex] required [tex] = \frac{1}{2}[/tex] moles
Similarly,
To produce 4 moles of water.
[tex]\implies[/tex] Moles of Oxygen[tex](O_2)[/tex] required = [tex]\frac{1}{2}\times 4[/tex] moles
[tex]\implies[/tex] 2 moles
Hope it helps.