Answer
See below
Work Step by Step
$y''+y=3e^x\cos 2x$
The complementary function is
$y_c(x)=c_1 \cos x+c_2\sin x$
We consider the complex differential equation
$z''+z=3e^{(1+2i)x}$
An appropriate complex-valued trial solution for this differential equation is:
$z_p(x)=A_0e^{(1+2i)x}$
where $A_0$ is a complex constant.
so that $z _p$ is a solution if and only if
$(-2+4i)A_0e^{(1+2i)x}=3e^{(1+2i)x}\\
\rightarrow A_0=\frac{3}{4i-2}$
Hence, $z=(\frac{3}{4i-2})e^{(1+2i)x}$
A particular solution is:
$y_p(x)=Re_{\{z_p\}}=\frac{3}{5}e^x\sin 2x-\frac{3}{10}e^x\cos 2x$
so that the general solution is
$y(x)=c_1\cos x+c_2\sin x+\frac{3}{5}e^x\sin 2x-\frac{3}{10}e^x\cos 2x$