(a) Electronic configuration of X = 2, 8, 6.
(b) Valency is the number of electrons participating in bond formation.
So, here X requires two electrons to attain noble gas configuration, so it will share 2 electrons with other elements and form a bond.