Question: $y^{'} - y = 2te^{2t}$, $y(0) = 1$
$p(t) = -1$, $g(t) = 2te^{2t}$
$u(t) = e^{\int -1dt} = e^{-t}$
multiply both sides with $u$, then we get:
$e^{-t}y^{'}-e^{-t}y=2te^{t}$
$(e^{-t}y)^{'} = 2te^{t}$
$d(e^{-t}y)= 2te^{t}dt$
$e^{-t}y=\int 2te^{t}dt$
$e^{-t}y = 2e^{t}(t-1)+C$
$y = 2e^{2t}(t-1)+Ce^{t}$
Since $y(0) = 1 \implies 1= 2\times e^{0}(0-1)+Ce^{0}$, then we get $C =3$
Therefore, general solution is: $y = 2e^{2t}(t-1)+3e^{t}$