(i) The position of elements X in the modern periodic table is group number 17 and period number 3. The position of element Y in the modern periodic table is group number 2 and period number 4. Electronic configuration of element X = 2, 8,7.
It has 3 shells so period number 3.
Halogens are kept in group 17.
Electronic configuration of element Y = 2,8,8,2
It has 4 shells so a period number is 4.
The valence shell has 2 electrons so the group number is 2.
(ii) The formula of the compound:
Valency of element Y =2
Valency of element X=1
YX2