Electronic configuration of element X, atomic number 12=2;8;2
Electronic configuration of element 'Y' atomic number 16=2,8,6
Both have three shells, so they belong to period 3.
They will form an ionic bond as x will form electropositive ion and Y will form an electronegative ion.