The electrons which take part in order to exhibit variable oxidation states by transition metals are:
ns and (n-1)d only but not np
Due to small energy difference between ns and (n-1)d orbitals, they participate in most bond formations in transition elements.