Here the first eigen vector corresponding to the eigen value $~\lambda = 3~$ is $~v_1 =\begin{pmatrix} 1 \\ -2 \end{pmatrix}~$. We have to find the second eigen vector corresponding to the repeated eigen value $~\lambda = 3~$.
For these we have to find the vector $~v_2=\begin{pmatrix} \alpha \\ \beta \end{pmatrix}~$ such that $~(A-3 I)v_2=v_1~$. Now
$$~(A-3 I)v_2=v_1$$
$$\implies \begin{pmatrix} 2 & 1 \\ -4 & -2 \end{pmatrix}\cdot \begin{pmatrix} \alpha \\ \beta \end{pmatrix}=\begin{pmatrix} 1 \\ -2 \end{pmatrix}$$
$$\implies 2\alpha~+~\beta~=~1$$Putting $~\alpha=1~,\beta=-1~$.
$$\therefore v_2=\begin{pmatrix} 1 \\ -1 \end{pmatrix}$$
So the general solution is
$$y(x)=c_1~v_1~e^{3x}~+~c_2\left(v_1~x~+~v_2\right)~e^{3x}$$
$$y(x)=c_1~e^{3x}~\begin{pmatrix} 1 \\ -2 \end{pmatrix}~+~c_2~e^{3x}~\left[\begin{pmatrix} 1 \\ -2 \end{pmatrix}~x~+~\begin{pmatrix} 1 \\ -1 \end{pmatrix}\right]$$where $~c_1,~c_2~$ are constants.
Note: For the question How does this idea come about ?, please find the reference given below :
"Differential Equations" by Shepley L. Ross