They tell you compound XH is covalent. This allows you to make some useful deductions:
-It’s most likely a non-metal, since the bonding is covalent - had it been an ionic compound, you would have been correct to choose C.
-It’s most likely a halogen, since it only forms one bond in the compound XH.
Now you just have to try using the ionisation energy trends to identify which of the four elements on the graph is most probably a halogen.