the oxidation state of Ni in both the compounds is +2 thrfore electronic configuration of Ni+2 ion is 1s(2) 2s(2) 2p(6) 3s(2) 3p(6) 3d (8)
it will be something like shown in attached figure....
now in case of Cl(-), it is a weak field ligand, so cant do the pairing of the unpaired electrons, so the electrons frm the ligands will hav to go to the vacant s and p orbitals.. giving it a sp3 hybridisation
while on the other hand, CN(-) is a strng field ligand, so will get the unpaired electron paired up.... thus thr will be one d orbital will be vacant, hence the electrons frm the ligands will go to d, s and p orbitals, giving it a dsp2 hybridisation