Step 1: Understanding the Concept
In an hcp structure with \(N\) atoms of B there are \(N\) octahedral voids.
Step 2: Count A Atoms
A occupies \(\dfrac{2}{3}\) of the octahedral voids, so the number of A atoms is \(\dfrac{2}{3}N\).
Step 3: Ratio
\(\text{A} : \text{B} = \dfrac{2}{3}N : N = 2 : 3\)
Step 4: Formula
The formula of the compound is \(\text{A}_2\text{B}_3\).
Final Answer:
The formula of the compound is A2B3.
\[ \boxed{\text{(D) }\text{A}_{2}\text{B}_{3}} \]