(N/A) Bohr$-$Bury Rules:
$(i)$ The maximum number of electrons present in a shell is given by the formula $2n^2$,where $n$ is the shell number.
$(ii)$ The maximum number of electrons that can be accommodated in the outermost orbit is $8$.
$(iii)$ Electrons are not accommodated in a given shell unless the inner shells are filled.
$(b)$ Electronic structure:
$(i)$ For element $X$ (Atomic number $17$): Electronic configuration is $2, 8, 7$. It has $2$ electrons in the $K$ shell,$8$ in the $L$ shell,and $7$ in the $M$ shell.
$(ii)$ For element $Y$ (Atomic number $16$): Electronic configuration is $2, 8, 6$. It has $2$ electrons in the $K$ shell,$8$ in the $L$ shell,and $6$ in the $M$ shell.