To solve the differential equation
\[ y'' - 2y' - 3y = e^{2x} \]
we can use the method of undetermined coefficients. We first solve the associated homogeneous equation:
\[ y'' - 2y' - 3y = 0. \]
The characteristic equation for this differential equation is:
\[ r^2 - 2r - 3 = 0. \]
We can factor this as follows:
\[ (r - 3)(r + 1) = 0. \]
Thus, the roots are:
\[ r = 3 \quad \text{and} \quad r = -1. \]
The general solution of the homogeneous equation is:
\[ y_h = C_1 e^{3x} + C_2 e^{-x}, \]
where \(C_1\) and \(C_2\) are constants.
Next, we find a particular solution, \(y_p\), to the non-homogeneous equation. Since the right-hand side is \(e^{2x}\) and neither of the homogeneous solutions contains \(e^{2x}\), we can assume a particular solution of the form:
\[ y_p = Ae^{2x}, \]
where \(A\) is a constant to be determined.
Now we compute \(y_p'\) and \(y_p''\):
\[ y_p' = 2Ae^{2x}, \] \[ y_p'' = 4Ae^{2x}. \]
Substituting \(y_p\), \(y_p'\), and \(y_p''\) back into the original differential equation:
\[ 4Ae^{2x} - 2(2Ae^{2x}) - 3(Ae^{2x}) = e^{2x}. \]
This simplifies to:
\[ 4Ae^{2x} - 4Ae^{2x} - 3Ae^{2x} = e^{2x}. \]
Simplifying further:
\[ -3Ae^{2x} = e^{2x}. \]
To find \(A\), we can set the coefficients equal:
\[ -3A = 1 \implies A = -\frac{1}{3}. \]
So the particular solution is:
\[ y_p = -\frac{1}{3} e^{2x}. \]
The general solution to the differential equation is the sum of the homogeneous and particular solutions:
\[ y = y_h + y_p = C_1 e^{3x} + C_2 e^{-x} - \frac{1}{3} e^{2x}. \]
Thus, the final solution is:
\[ \boxed{y = C_1 e^{3x} + C_2 e^{-x} - \frac{1}{3} e^{2x}}, \]
where \(C_1\) and \(C_2\) are arbitrary constants.