Whenever gases react together, the volumes of the reacting gases and the products bear a simple whole number ratio, provided all the volumes are measured under similar conditions of temperature and pressure.
Steps:
(a) Hydrogen combines with oxygen to form water

Two volumes of hydrogen react with one volume of oxygen to form two volumes of water vapour that is the ratio by volume, which gases bears is 2:1:2, which is a simple whole number ratio