The correct statement about nitrogen (N) and phosphorus (P) is:
They have the same number of valence electrons.
Both nitrogen and phosphorus are in Group 15 of the periodic table, which means they each have 5 valence electrons. The other statements provided are incorrect: they do not have the same number of electron shells (N has 2, while P has 3), they are not inert (inert gases belong to Group 18), and they are not halogens (which are in Group 17).