The formation of water is as follows:
2H2 + O2 → 2H2O
Here,
2 volumes of H2 reacts with 1 volume of O2 to give 2 volumes of H2O
If 10 volumes of H2 gas react's with 5 volumes of O2 gas,
10(5x2) volumes of H2 react with 5(5x1) volumes of O2 to give water
= 2x5 = 10 volumes of water