Given system of differential equation $$\begin{cases} x'=2x-y \\ y'=x+2y \end{cases}$$ can be written as $$\dfrac{dX}{dt}=AX\qquad\text{where}\quad A=\begin{pmatrix}
2 & -1 \\
1 & 2
\end{pmatrix}\quad\text{and}\quad X=\begin{pmatrix}
x \\
y
\end{pmatrix}~.$$
Consider the solution of the differential equation is of the form $~x=\bar \alpha ~e^{\lambda~t}~~$where $~\bar \alpha~$ is the eigen-vector corresponding to the eigen-value $~\lambda~$.
For non trivial solution $$\begin{vmatrix}
2-\lambda & -1 \\
1 & 2-\lambda
\end{vmatrix}=0$$
$$\implies (2-\lambda)^2+1=0$$
$$\implies \lambda=2\pm~ i$$
Now we have to find the eigen-vector corresponding to $~\lambda=2\pm ~i~$.
For $~\lambda=2-i~$, $$AX=(2-i)X\implies \left(\begin{matrix}
2 & -1 \\
1 & 2
\end{matrix}\right)\left(\begin{matrix}
x \\
y
\end{matrix}\right)=(2-i)~\left(\begin{matrix}
x \\
y
\end{matrix}\right)\implies i~x-y=0$$
So $~\bar\alpha^{(1)}=\left(\begin{matrix}
i \\
-1
\end{matrix}\right)~$.
For $~\lambda=2+i~$, $$AX=(2+i)X\implies \left(\begin{matrix}
2 & -1 \\
1 & 2
\end{matrix}\right)\left(\begin{matrix}
x \\
y
\end{matrix}\right)=(2+i)~\left(\begin{matrix}
x \\
y
\end{matrix}\right)\implies x-iy=0$$
So $~\bar\alpha^{(2)}=\left(\begin{matrix}
i \\
1
\end{matrix}\right)~$.
So the general solution is $$X=A~\bar\alpha^{(1)}~e^{(2-i)~t}+B~\bar\alpha^{(2)}~e^{(2+i)~t}$$where $~A,~B~$are constants.
So $$ X=A~\left(\begin{matrix}
i \\
-1
\end{matrix}\right)~e^{(2-i)~t}+B~\left(\begin{matrix}
i \\
1
\end{matrix}\right)~e^{(2+i)~t}$$
$$\implies \begin{pmatrix}
x \\
y
\end{pmatrix}=A~\left(\begin{matrix}
i \\
-1
\end{matrix}\right)~e^{(2-i)~t}+B~\left(\begin{matrix}
i \\
1
\end{matrix}\right)~e^{(2+i)~t}$$
$$\implies\begin{cases} x=iAe^{(2-i)t}~+~iBe^{(2+i)t} \\ y=-Ae^{(2-i)t}~+~Be^{(2+i)t} \end{cases}$$where $~A,~B~$are constants.