According to Dalton's Atomic Theory, the Law of Definite Proportion is applied when a compound is always made up by a fixed fraction of its individual elements. This is manifested by the balancing of the reaction.
The reaction for this problem is:
H₂ + Cl₂ → 2 HCl
1 mol of H₂ is needed for every 1 mole of Cl₂. Assuming these are ideal gases, the moles is equal to the volume. So, if equal volumes of the reactants are available, they will produce twice the given volumes of HCl.