Answer
$$\frac{1}{2} x \sqrt{x^{2}+9}+\frac{9}{2} \ln \left|\frac{x+\sqrt{x^{2}+9}}{3}\right|+C$$
Work Step by Step
Given $$\int \sqrt{x^{2}+9} d x$$
Let $$x=3\tan u\ \ \ \ \ \ \ dx=3\sec^2 udu $$
Then
\begin{align*}
\int \sqrt{x^{2}+9} d x&=\int \sqrt{9\tan^2 u+9} 3\sec^2 udu\\
&=\int \sqrt{9\sec^2 u} 3\sec^2 udu\\
&=9\int \sec^3udu
\end{align*}
Use
$$\int \sec ^{n} u d u=\frac{1}{n-1} \tan u \sec ^{n-2} u+\frac{n-2}{n-1} \int \sec ^{n-2} u d u $$
Then
$$\int \sec ^{3} u d u=\frac{1}{2} \sec u \tan u+\frac{1}{2} \ln |\sec u+\tan u|+C$$
Hence
\begin{align*}
\int \sqrt{x^{2}+9} d x&=\int \sqrt{9\tan^2 u+9} 3\sec^2 udu\\
&=\int \sqrt{9\sec^2 u} 3\sec^2 udu\\
&=9\int \sec^3udu\\
&=\frac{9}{2} \sec u \tan u+\frac{9}{2} \ln |\sec u+\tan u|+C\\
&=\frac{1}{2} x \sqrt{x^{2}+9}+\frac{9}{2} \ln \left|\frac{x+\sqrt{x^{2}+9}}{3}\right|+C
\end{align*}