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 and each has five valence electrons. The other statements are incorrect: they are not classified as halogens (which are in Group 17), they are not inert (inert gases are in Group 18), and they do not have the same number of electron shells (nitrogen has two electron shells, while phosphorus has three).