$\large\frac{r_{H_2}}{r_{O_2}} = \large\frac{V_{H_2}}{V_{O_2}}$
$\large\frac{n_{H_2}}{n_{O_2}} = \sqrt{\large\frac{M_{O_2}}{M_{H_2}}}$
$\large\frac{2/2}{w/32} = \sqrt{\large\frac{32}{2}}$
$\large\frac{2}{2} \times \large\frac{32}{w} = \sqrt{16}$
$\large\frac{32}{w} = 4$
w = 8g
Hence answer is (D)