The correct option is B Electron affinity of Y is high and ionisation energy of X is low
Ionic compounds are formed between elements out of which one of the species is electropostive and the other is electronegative. The above compound can be formed only when X can easily lose electron and Y can accept electron easily i.e ionisation energy of X should be low and electron affinity of Y should be high .