Nitrogen forms only trivalent compounds because its electronic configuration is:
1s2 2s2 2p3
So, there are no empty d orbitals available for bonding.
The electronic configuration of P is:
1s2 2s2 2p6 3s2 3p3
There are empty 3d orbitals available for bonding. So, P can undergo sp3d hybridisation and form both trivalent and pentavalent compounds like PCl3 and PCl5 .
You have rated this answer /10