I'm usually not one for replying to answered threads, especially in light of the expert help already provided by topsquark and County Boy. That said, I'm detailing another solution outline here because the method on which it's based,
Duhamel's Principle, is one of my favorites. What I like about this method is its generality, including its application to inhomogeneous PDEs. Note that in the case of linear inhomogeneous ODEs, which this problem is, Duhamel's Principle is equivalent to a technique known as the
Variation of Parameters.
We consider the problem
$$ y'-y = 2te^{2t}, \qquad y(0) = y_{0}\qquad (*)$$
Set $v = y-y_{0}$ and note that $v' = y'$. Then, upon substituting for $y$, $(*)$ becomes
$$v'-v = 2te^{2t} + y_{0}, \qquad v(0) = 0 \qquad(**)$$
This is an inhomogeneous linear evolution equation, whose solution is given by
$$v(t) = \int_{0}^{t}(P^{s}f)(t)ds,$$
where $(P^{s}f)(t)$ is the solution of the problem
$$v'-v = 0, \qquad v(s) = f(s) = 2se^{2s}+y_{0}.$$
See
Duhamel's Principle - Wikipedia for a reference.
The solution to $v'-v = 0$ is given by $v(t) = Ce^{t}.$ The condition $v(s) = 2se^{2s}+y_{0}$ implies $C = 2se^{s}+y_{0}e^{-s}$. Thus,
$$(P^{s}f)(t) = \left[2se^{s} + y_{0}e^{-s}\right]e^{t}.$$
According to Duhamel's Principle, the solution to $(**)$ is
$$\begin{align*}
v(t) &= \int_{0}^{t}(P^{s}f)(t) ds\\
& = \int_{0}^{t}\left[2se^{s} + y_{0}e^{-s}\right]e^{t}ds\\
& = e^{t}\int_{0}^{t}2se^{s} + y_{0}e^{-s}ds
\end{align*}
$$
Using integration by parts on the $2se^{s}$ term we obtain
$$
\begin{align*}
v(t) &= e^{t}\left[2se^{s}-2e^{s} - y_{0}e^{-s}\Biggr|_{0}^{t} \right]\\
&= 2te^{2t}-2e^{2t}+(2+y_{0})e^{t} - y_{0}
\end{align*}
$$
Using $v = y - y_{0}$ to substitute back for $y$ and setting $C = 2+y_{0}$, we obtain
$$y(t) = Ce^{t} + (2t-2)e^{2t},$$
as was previously demonstrated.