In both cases iron exhibits +2 oxidation state.
Electronic configuration of Fe+2 ion =[Ar]3d6

In [Fe(H2O)6]2+,H2O is a weak field ligand and hence, no pairing up.
∴ number of unpaired electron n=4
⇒Spin magnetic moment =4(4+2)=24=4.9BM
In [Fe(CN)6]4−, CN− is a strong field ligand and hence, pairing will occur.
∴ number of unpaired electron n=0
⇒ spin magnetic moment = zero