Cr is in the +3 oxidation state i.e.,d3 configuration. Also, NH3 is a weak field ligand that does not cause the pairing of the electrons in the 3d orbital. and the electrons in the 3d orbitals remain unpaired. Hence, it is paramagnetic in nature.
In [Ni(CN)4]2−, Ni exists in the +2 oxidation state i.e., d8 configuration. CN− is a strong field ligand. It causes the pairing of the 3d orbital electrons. Then, Ni2+ undergoes dsp2 hybridization. As there are no unpaired electrons, it is diamagnetic.