$$y''-2y'+y= \frac {e^x} x$$
$$y''-y'-(y'-y)= \frac {e^x} x$$ Substitute $h=y'-y$ $$h'-h=\frac {e^x} x$$
Which is a first ODe easy to solve
$$ {e^{-x}h'-e^{-x}h}=\frac {1} x$$
$$ {h}{e^{-x}}=\int \frac {dx} x$$
$$ h=y'-y= {e^{x}}(\ln(x)+K)$$
$$ e^{-x}y'-ye^{-x}= \ln(x)+K$$
$$ (ye^{-x})'= \ln(x)+K$$
$$ y=e^{x} \int(\ln(x)+K )dx$$
$$ y=e^{x}(x\ln(x)+K_1x+K_2)$$