Answer
The solution to the given initial-value problem is
$$
y(x)=e^{3x}+e^{-x}
$$
Work Step by Step
$$
y^{\prime \prime}-2 y^{\prime}-3 y=0, \quad y(0)=2, \quad y^{\prime}(0)=2
$$
The given equation is a homogeneous linear equation. So the characteristic equation of the differential equation is
$$
r^{2}-2r-3 =0
$$
whose roots are
$$
r_{1,\:2}=\frac{-\left(-2\right)\pm \sqrt{\left(-2\right)^2-4\cdot \:1\left(-3\right)}}{2\cdot \:1}
$$
$\Rightarrow$
$$
r_{1}=3,\:r_{2}=-1
$$
Therefore, the general solution of the given differential equation is
Then
$$
y^{\prime }(x)=3c_{1}e^{3x}-c_{2}e^{-x},
$$
so
$$
y(0)=2
$$
$\Rightarrow$
$$
y(0)=c_{1}e^{0}+c_{2}e^{0}=c_{1}+c_{2}=2
$$
and
$$
y^{\prime }(0)=2
$$
$\Rightarrow$
$$
y^{\prime }(0)=3c_{1}e^{0}-c_{2}e^{0}=3c_{1}-c_{2}=2,
$$
giving $c_{1}=1,\:c_{2}=1$
Thus, the solution to the initial-value problem is
$$
y(x)=e^{3x}+e^{-x}
$$