Are you sure you have it written correctly?.
As is, \(\displaystyle x^{2}y'+xy=e^{x}\), it is not easily done.
Divide by x^2:
\(\displaystyle y'+\frac{1}{x}y=\frac{e^{x}}{x^{2}}\)
You end up with \(\displaystyle \int\frac{e^{x}}{x}dx\), which is not integrable by elementary means.
If it were changed to \(\displaystyle x^{2}y'+xy=x\), then you'd be in business.