Answer:
C
Step-by-step explanation:
looking at a periodic table X is fluorine and Y is potassium
Fluorine is in group 7 and forms a 1- charge (which gains electrons) and potassium is in group 1 and forms a 1+ charge (which loses electrons)
Fluorine (X) has an electronic structure of 2,7 and needs to gain an electron from Potassium (Y) to have a full outer shell and potassium has an electronic structure of 2,8,8,1 so needs to lose an electron to have a full outer shell as well. This means that the electron that potassium (Y) has lost is given away to fluorine (X), so both elements become stable.
This is known as ionic bonding where metals (like potassium) lose electrons and non-metals (like fluorine) gain electrons to become more stable, forming ions
Any further clarification let me know