Balanced chemical reaction: Cd + NiO₂ + 2H₂O → Cd(OH)₂ + Ni(OH)₂.
Number of atoms of same element must be same on both side of chemical reaction. In balanced chemical reaction there are 4 atoms of hydrogen, 2 atoms of oxygen, 1 atom of nickel and 1 atom of cadmium on both side.
Sum of coefficients are: 1 + 1 + 2 + 1 + 1 = 6.