We solve $(\textrm{ln}(x^2-9))^2=\textrm{ln}(x+3)+\textrm{ln}(x-3)+2$.


$(\textrm{ln}(x^2-9))^2=\textrm{ln}(x+3)+\textrm{ln}(x-3)+2 \Leftrightarrow (\textrm{ln}(x^2-9))^2=\textrm{ln}(x^2-9)+2$.

We define $p=\textrm{ln}(x^2-9)$. We obtain
$$\begin{align}
p^2=p+2 & \Leftrightarrow p^2-p-2=0\\
& \Leftrightarrow (p-2)(p+1)=0\\
& \Leftrightarrow p=-1 \mbox{ or } p=2.
\end{align}$$

Via $p=-1$ we get
$$\begin{align}
-1=\textrm{ln}(x^2-9) & \Leftrightarrow \textrm{ln}(e^{-1})=\textrm{ln}(x^2-9)\\
& \Leftrightarrow e^{-1}=x^2+9\\
& \Leftrightarrow x^2=e^{-1}+9\\\
& \Leftrightarrow x^2=\frac{1}{e}+9\\
& \Leftrightarrow x=\sqrt{\frac{1}{e}+9} \mbox{ or } x=-\sqrt{\frac{1}{e}+9}.
\end{align}$$

Via $p=2$ we get
$$\begin{align}
2=\textrm{ln}(x^2-9) & \Leftrightarrow \textrm{ln}(e^{2})=\textrm{ln}(x^2-9)\\
& \Leftrightarrow e^{2}=x^2-9\\
& \Leftrightarrow x^2=e^{2}+9\\\
& \Leftrightarrow x=\sqrt{e^2+9} \mbox{ or } x=-\sqrt{e^2+9}.
\end{align}$$

Hence, the four possible solutions are $x=\sqrt{\frac{1}{e}+9}$, $x=-\sqrt{\frac{1}{e}+9}$, $x=\sqrt{e^2+9}$ and $x=-\sqrt{e^2+9}$, but since the equation is only defined for $x>3$ we only obtain $x=\sqrt{\frac{1}{e}+9}$ and $x=\sqrt{e^2+9}$ as solutions.