Nitride ion, N3−, carries a -3 charge on it. It can combine with 3 cations. Thus, its valency is 3.
Sulphide ion, S2−, carries a -2 charge on it. It can combine with 2 cations. Thus, its valency is 2.
Oxide ion, O2−, carries a -2 charge on it. It can combine with 2 cations. Thus, its valency is 2.