You are on the right track!
Based on the assumption that $x\in(0,1)\cup(1,+\infty)$, we can rewrite the first term from the LHS of the original equation as follows:
\begin{align*}
\log_{x}(9x^{2}) = \log_{x}(9) + 2\log_{x}(x) = \log_{x}(3^{2}) + 2 = 2\log_{x}(3) + 2
\end{align*}
As you have already noticed, the following identity holds:
\begin{align*}
\log_{x}(3) = \frac{1}{\log_{3}(x)}
\end{align*}
Gathering all the previous results and letting $y = \log_{3}(x)$, one arrives at the desired solution set:
\begin{align*}
\left(\frac{2}{y} + 2\right)y^{2} = 4 & \Longleftrightarrow (2 + 2y)y^{2} = 4y \tag{$y\neq 0$}\\
& \Longleftrightarrow y(2y^{2} + 2y - 4) = 0 \tag{$y\neq 0$}\\\\
& \Longleftrightarrow 2y(y^{2} + y - 2) = 0 \tag{$y\neq 0$}\\\\
& \Longleftrightarrow y\in\{-2,1\}\\\\
& \Longleftrightarrow \log_{3}(x)\in\{-2,1\}\\\\
& \Longleftrightarrow x\in\left\{\frac{1}{9},3\right\}.
\end{align*}
Hopefully this helps!