Solution:
Key idea: the outer-shell (valence) electrons decide the group and the valency: ns2 means group 2; ns2np2 means group 14.
Step 1 — (a) Configurations. X (Z = 12): 1s22s22p63s2 (magnesium). Y (Z = 14): 1s22s22p63s23p2 (silicon).
Step 2 — (b) Groups. Both have n = 3 as the outer shell, so both are in period 3. X has 2 valence electrons in an s sub-shell: group 2 (s-block, alkaline earth metals). Y has 4 valence electrons (3s² 3p²): group 14 (p-block, carbon family).
Step 3 — (c) Oxidation states. X loses its two 3s electrons to reach the neon configuration: oxidation state +2 (valency 2). Y uses all four valence electrons in bonding: oxidation state +4 (valency 4); with very electropositive metals it can also show −4.
Step 4 — (d) Simplest chlorides. Chlorine has valency 1, so X forms XCl2 (MgCl2) and Y forms YCl4 (SiCl4).
Therefore, (a) X: 1s² 2s² 2p⁶ 3s², Y: 1s² 2s² 2p⁶ 3s² 3p²; (b) X is in group 2 and Y in group 14; (c) X shows +2 and Y +4; (d) XCl₂ (MgCl₂) and YCl₄ (SiCl₄).