Answer
$$y = \frac{{{e^x} + 1}}{x},{\text{ where }}x > 0$$
Work Step by Step
$$\eqalign{
& xy' + y = {e^x},{\text{ }}y\left( 1 \right) = 1 + e \cr
& {\text{The left - hand side can be interpreted as the derivative of the}} \cr
& {\text{product }}{x^2}y.{\text{ }}\frac{d}{{dx}}\left[ {xy} \right] = xy' + y = {e^x},{\text{ then,}} \cr
& xy' + y = {e^x} \cr
& \frac{d}{{dx}}\left[ {xy} \right] = {e^x} \cr
& {\text{Integrate both sides with respect to }}x \cr
& xy = {e^x} + C \cr
& {\text{Solve for }}y \cr
& y = \frac{{{e^x}}}{x} + \frac{C}{x} \cr
& {\text{Use the initial condition }}y\left( 1 \right) = 1 + e \cr
& 1 + e = \frac{{{e^1}}}{1} + \frac{C}{1} \cr
& 1 + e = e + C \cr
& C = 1 \cr
& {\text{,then}} \cr
& y = \frac{{{e^x}}}{x} + \frac{1}{x} \cr
& y = \frac{{{e^x} + 1}}{x},{\text{ where }}x > 0 \cr} $$