In the given compound; there must be 8 corners in a cube,
So, as the Y atoms are at corners, so each of the Y atom will contribute 18 part towards a particular unit cell.
The no. of Y atoms per unit cell =8×18=1
Further, the X atoms are at the alternate faces so they will be available only at one of the opposite faces, so the contribution of each of the X-atoms will be 12 towards the face center.
The no. of X-atoms =2×12=1
Hence, the formula of the compound will be "XY" .