The correct statement is:
They have the same number of valence electrons.
Both nitrogen (N) and phosphorus (P) belong to group 15 of the periodic table and have 5 valence electrons. The other statements are incorrect: nitrogen and phosphorus are not inert (they can react with other elements), and they are not classified as halogens (halogens are in group 17). Additionally, nitrogen has two electron shells, while phosphorus has three.