Calculate the formula, and moles
At first you said that $x = \pu{2.0449\times10^−5 mol}$ and then later said $x=3$. It is clearly wrong even without going into the maths!

That said, I believe you are confusing the stoichiometry of the compound with the number of moles of the compound produced. The $x$ in $\ce{(A3B2)_x}$ is a part of the chemical formula for that compound, and not the moles of $\ce{(A3B2)}$ produced.  

For example, $\ce{AlCl3}$ usually exists as a dimer in gas phase, so we write it as $\ce{Al2Cl6}$ or simply $\ce{(AlCl3)2}$ for clarity. You should hence realize that the $x$ in $\ce{(A3B2)_x}$ represents the number of $\ce{A3B2}$ molecules that have polymerized together to form a single molecule. And the question states that $\pu{1.231\times10^19}$ of such molecules was produced. 

With the conceptual clarity attained, we'll now solve the numerical. Note that the question says that all the moles of elemental A were obtained in the compound. This implies:

$$
\begin{align}
\text{moles of A in the compound} &amp;= \text{original moles of elemental A}\\
\implies 3x\times(\text{moles of compound }\ce{A3B2})&amp;=1.84\times10^{-4}
\end{align}
$$

Solving this, you'll get approximately $x=3$, which is the expected answer.