The correct option is B ns2np5
The elements of group 17 have seven electrons in the valence shell and hence their general electronic configuration is ns2np5.
Thus, they contain one electron less than the nearest inert gas configuration.
For example Fluorine has electronic configuration 1s22s22p5. Hence option (a) is correct.