Use undetermined coefficients
I think your supposed to let $y_p=Axe^{x}\cos \left(2x\right)+bxe^{x}\sin \left(2x\right)$
then take $y'\left(p\right)$ and $y"\left(p\right)$ plug em in for $y"\left(p\right)+2y'\left(p\right)+y\left(p\right)$ and solve for $A and B$ to find particular solution
But taking all these derivatives would be an extreme hassle.
After simplifying $y"\left(p\right)+2y'\left(p\right)+y\left(p\right)=e^x\cos \left(2x\right)$ I end up with
$4Be^x\cos 2x-4Ae^x\sin \left(2x\right)=e^x\cos \left(2x\right)$
So $4B=1$ and $A=0$ then $y_p=\frac{1}{4}xe^x\sin \left(2x\right)$
Remember product rule for three functions is $\left(fgh\right)'=f'gh+fg'h+fgh'$
Also remember to multiply an $x$ to the guess for the form of the particular solution since the normal guess of $y_p=Ae^{x}\cos \left(2x\right)+be^{x}\sin \left(2x\right)$ appears in the complementary solution.