It's important to know that diffraction gratings can be identified by the number of lines they have per centimeter. Often, more lines per centimeter is more useful because the images separation is greater when this happens. That is, the distance between lines increases.
There are 4 hydrogens on the right side , and 2 hydrogens on the left per molecule of . To get the same number of hydrogens on both sides, the coefficient should be 2.
(Then the number of oxygens will be consistent, since contributes 2 oxygens, and so does .)