For the left-hand side, we could write as $r^2+9=0$.Thus $r=3i$ or $r=-3i.
$
Now $Y_{c}=C_{1}cos3t+C_{2}sin3t
$
For the Right-hand side, $Y_{1}(t)=cos3t$, $Y_{2}(t)+sin3t$, $g(t)=9sec^2(3t)$
$$W(t)=\left[
\begin{matrix}
cos3t & sin3t \\
-3sin3t& 3cos3t
\end{matrix}
\right] \tag{3}=3
$$
$$W_{1}(t)=\left[
\begin{matrix}
0 & sin3t \\
1 & 3cos3t
\end{matrix}
\right] \tag{3}=-sin3t
$$
$$W_{2}(t)=\left[
\begin{matrix}
cos3t & 0 \\
-3sin3t& 1
\end{matrix}
\right] \tag{3}=cos3t
$$
So, the particular solution is $$Y_{p}(t)=Y_{1}\int\frac{g(s)W_{1}(s)}{W(s)}\,ds+Y_{2}\int\frac{g(s)W_2(s)}{W(s)}\,ds=-1+\sin(3t)\ln |\sec(3t)+\tan(3t)|$$
Thus, the general solution is $Y(t)=C_{1}cos(3t)+C_{2}sin(3t)+sin(3t)ln$||sec(3t)+tan(3t)||-1