Multiply both sides of the ODE by [tex]e^x[/tex]:
[tex]x^2y'+x(x+2)y=e^x\implies x^2e^xy'+(x^2+2x)e^xy=e^{2x}[/tex]
and notice that [tex](x^2e^x)'=2xe^x+x^2e^x=(x^2+2x)e^x[/tex]. So we can collapse the left side and write it as the derivative of a product:
[tex]\left(x^2e^xy\right)'=e^{2x}[/tex]
[tex]\implies x^2e^xy=\displaystyle\int e^{2x}\,\mathrm dx[/tex]
[tex]\implies x^2e^xy=\dfrac{e^{2x}}2+C[/tex]
[tex]\implies y=\dfrac{e^x}{2x^2}+\dfrac C{x^2e^x}[/tex]
We can't have [tex]x=0[/tex], so [tex](0,\infty)[/tex] (or [tex](-\infty,0)[/tex], depending on the initial value) would be the largest interval over which the solution is valid.
As [tex]x\to\infty[/tex], we see the [tex]\dfrac C{x^2e^x}[/tex] term rapidly approaching 0, so this is the only transient term.