The correct option is B 7
Given that X forms NaX on reaction with sodium, the valency of X is 1. Thus, X can either have 1 or 7 electrons in its valence shell.
If M is the valence shell, the possible electronic configurations of X are: 2,8,1 or 2,8,7
Now, 2,8,1 is the electron configuration of sodium. Hence, the electronic configuration of X is 2,8,7 and the number of valence electrons is 1.