The correct option is B Seven
An atom of an element (X) has its K, L and M shells filled with some electrons. It reacts with sodium metal to from a compound NaX. The number of electrons in the M shell of the atom (X) will be Seven.
In NaX, Na forms Na+ and X forms negtive ions. Thus, X gains one electron to form uni negative ion in which octet will be completed. Hence, X has 7 valence electrons
Hence, the option (B) is correct answer.