Answer
The general solution is:
$$y(t) = c_1\sin(3t)+c_2\cos(3t) +\ln|\sec(3t)+\tan(3t)|\sin(3t)-1$$
Work Step by Step
$$y{''}+9y = 9\sec^2{(3t})$$
$$g(t) = 9\sec^2{(3t})$$
To find the complementary function $y_c(t)$, consider the homogeneous part
$$y''+9y=0$$
Corresponding characteristic equation is:
$$m^2+9=0$$
$$ m = \pm 3\iota $$
Hence, Complementary function is:
$$y_c(t) = c_1\sin(3t)+c_2\cos(3t)$$
Hence Independent solutions $y_1(t)$ and $y_2(t)$ of homogeneous equation will be
$$y_1(t) = \sin(3t) \text{ and } y_2(t) = \cos(3t)$$
Particular Solution $y_p(t)$ is given by:
$$y_p(t) = u_1(t)y_1(t)+u_2(t)y_2(t)$$
where $$u_1(t) = -\int \frac{y_2(t)g(t)}{W(y_1,y_2)(t)}dt + c_3$$
$$u_2(t) = \int \frac{y_1(t)g(t)}{W(y_1,y_2)(t)}dt+c_4$$
Since, $y_p(t)$ is a particular solution so we can choose $c_3=c_4=0$ such that both the constant term vanishes.
$$W(y_1, y_2)(t) =
\begin{vmatrix}
\sin(3t) & \cos(3t) \\
3\cos(3t) & -3\sin(3t)
\end{vmatrix}=-3$$
$$u_1(t) = -\int \frac{\cos(3t) \times 9\sec^2{(3t})}{-3}dt = 3\int \sec(3t)dt$$
$$u_1(t) = 3\frac{1}{3}\ln|\sec(3t)+\tan(3t)| = \ln|\sec(3t)+\tan(3t)|$$
$$u_2(t) = \int \frac{\sin(3t)\times 9\sec^2(3t)}{-3}dt = -3\times \int \tan(3t)\sec(3t)dt$$
$$u_2(t) = -3\frac{1}{3} \sec(3t) = -\sec(3t)$$
$$\therefore y_p(t) = \ln|\sec(3t)+\tan(3t)|\sin(3t)-\sec({3t})\cos(3t)$$
$$\therefore y_p(t) = \ln|\sec(3t)+\tan(3t)|\sin(3t)-1$$
Therefore, the general solution is:
$$y(t) = y_c(t)+y_p(t)$$
$$y(t) = c_1\sin(3t)+c_2\cos(3t) +\ln|\sec(3t)+\tan(3t)|\sin(3t)-1$$