The correct option is D XY2
The molecular formula of a compound is derived from the symbols and valancies of its constituting elements using criss cross method, a short-cut method, as shown below.
Symbol: X Y
↘↙
Valency: 4 2
From the above method, the formula obtained for the compound is X2Y4. This is simplified by taking whole number ratio of the valencies. Thus, molecular formula of the given compound is written as XY2.