Solution of $y''+2y'+2y=\exp(-x(1+i))$

Because the RHS is already a solution of the homogeneous equation, you have to add an extra factor $x$ ...

$$ y_p = A x e^{-x(1+i)}\qquad\text{where $A$ is a complex constant} \\ \text{or} \\ y_p = A x e^{-x}\sin(x) + B x e^{-x}\cos(x)\qquad\text{where $A,B$ are real constants} $$


$$y''+2y'+2y=e^{-x(1+i)}$$ $$(ye^x)''+ye^x=e^{-ix}$$ $$z''+z=e^{-ix}$$ Then the particular solution is : $$\implies z_p=Axe^{-ix}$$ $$\implies A= \dfrac i2$$


Particular solution
In general, it's impossible to provide a formula for how to find a particular solution. So what you usually do is make an Ansatz (or a guess), and see if you can find a solution.

So try and think about it. You want to guess on some function that you differentiate multiple times and add together in the LHS and end up with an exponential function. This probably has to be some exponential function. So you could guess $$y=A e^{b x}$$ and try to insert it in the LHS and set it equal to RHS and see if you can determine $A,b$.

That is: $$ b^{2} A e^{b x}+2 b A e^{b x}+2 A e^{b x}=A e^{b x}\left(b^{2}+2 b+2\right)=e^{-x(1+i)} $$

Hint: you can read off the value of $b$. What should $A\left(b^{2}+2 b+2\right)$ be equal to?

A rule of thumb is usually to guess on a exponential function if there is a exponential on RHS. Trigonometric if there is a cosine or sine on RHS. And polynomial if there is a polynomial on RHS.

General solution
For the general solution, you have to remember that it is given by the homogenous solution + the particular solution.
Why you may ask. Consider $y_0$ to be a homogenous solution and $y_p$ to be a particular solution. Then $y=y_0+y_p$ is the general solution: $$ \begin{aligned} &\left(y_{0}+y_{p}\right)^{\prime \prime}+2\left(y_{0}+y_{p}\right)^{\prime}+2\left(y_{0}+y_{p}\right) \\ &=y_{0}^{\prime \prime}+y_{p}^{\prime \prime}+2 y_{0}^{\prime}+2 y_{p}^{\prime}+2 y_{0}+2 y_{p} \\ &=\left(y_{0}^{\prime \prime}+2 y_{0}^{\prime}+2 y_{0}\right)+\left(y_{p}^{\prime \prime}+2 y_{p}^{\prime}+2 y_{p}\right) \\ &=0+e^{-x(1+i)}=e^{-x(1+i)} \end{aligned} $$