Step 1: Formula-first Approach
Octahedral voids $=$ number of atoms in the close-packed lattice.
Step 2: Calculation
Taking 3 atoms of Y gives 3 octahedral voids, and X fills $\dfrac{1}{3}$ of them, which is 1 void.
Step 3: Conclusion
X : Y $=1:3$, so the formula is $\text{XY}_3$.
Final Answer:
The formula is $\text{XY}_3$.
\[ \boxed{\text{(A) }\text{XY}_{3}} \]