Write the reaction in two half reactions,oxidation half and reduction half as:
Oxidation:
Hg2(CN)2→Hg(OH)2+CO2−3+NO3−Reduction:Ce4+→Ce3+
Balance all atoms other than O and H.
Hg2(CN)2→2Hg(OH)2+2CO2−3+2NO3−
Ce4+→Ce3+
Now balance the oxygen atoms by adding H2O molecules.
Hg2(CN)2+16H2O→2Hg(OH)2+2CO2−3+2NO3−
Ce4+→Ce3+
Now balance hydrogen atoms by adding H+ ions.
Hg2(CN)2+16H2O→2Hg(OH)2+32H++2CO2−3+2NO−3
Ce4+→Ce3+
As reaction takes place in basic medium, add one OH− each side for every H+ ion present in the reaction.Combine OH− and H+ to form H2O.
Hg2(CN)2+32OH−→2Hg(OH)2+16H2O+2CO2−3+2NO3−
Ce4+→Ce3+
To balance the charge,add electrons to more positive side to equal the less positive side of the half reaction.
Hg2(CN)2+32OH−→2Hg(OH)2+16H2O+2CO2−3+2NO3−+26e−
Ce4++e−→Ce3+
Now multiply reduction half reaction by 26 and add both the reactions we will get
Hg2(CN)2+26Ce4++32OH−→2Hg(OH)2+16H2O+2CO2−3+2NO3−+26Ce3+