In H2O, the ratio of masses of H and O is 2:16.
In SO2 , the ratio of masses of S and O is 32:32.
Therefore, the ratio of masses of H and S which combine with a fixed mass of oxygen (say 32 parts) will be 4:32 i.e., 1:8.
When H and S combine together, they form H2S in which the ratio of masses of H and S is 2:32 i.e., 1:16 .
The two ratios (i) and (ii) are related to each other as 2:1, i.e., they are whole number multiple of each other. Thus, the ratio of masses of H and S which combines with a fixed mass of oxygen is a whole number multiple of the ratio in which H and S combine together.