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