Hint: Think about the positions of both the elements in the periodic table and based on that whether they are more likely to give electrons or take electrons. Determine the block they belong to and the fact that they are univalent will give you an idea about their group.
Visualize the periodic table, towards the leftmost end of it lie the s-block element that includes the alkali metals and the alkaline earth metals. Then, we come across the d-block elements in between, also called the transition element, which is what we are looking for in this problem. Towards the right of the transition elements lie the p-block elements that include six groups of elements. The inner transition elements or the f-block elements are present at the bottom of the periodic table.
From this, we can say that if the element $X$ on the left side of the transition elements then it belongs to the two groups that make up the s-block in the periodic table. The question also states that $X$ is univalent; thus, it will be among the alkali elements as they have 1 electron in their outermost shell which they can lose.
Now, to element $Y$. If it is present on the right side of the transition elements, then it is present in the six groups of the p-block elements. We can eliminate the group including the inert gases since they do not react and are said to have 0 valency. Among the others, the halogens are the ones that are short of 1 electron to complete their octet and are thus considered univalent.
Thus, we can see that the alkali metal will lose 1 electron to the halogen to satisfy its valency. Some salt like $NaCl$ will be formed.
So, the correct answer is “Option A”.
Note: Although halogens are quite capable of forming covalent bonds with carbon or silicon. The covalent bonds that halogens form with carbon and silicon are slightly polar. Thus, seeing the difference in electronegativity, and tendency to either give away or take electrons without sharing, in both the elements this bond is ionic and not covalent. Please do not mark your answer as ‘B. $X-Y$’