As the question has been answered, I am providing an alternative solution. Observe that
$$\begin{align}\big(y''(x)-y'(x)\big)-\frac{1}{x-1}\,\big(y'(x)-y(x)\big)&=y''(x)-\frac{x}{x-1}\,y'(x)+\frac{1}{x-1}\,y(x)
\\&=(x-1)\,\exp(x)\,.
\end{align}$$
Thus,
$$\frac{\text{d}}{\text{d}x}\,\left(\frac{y'(x)-y(x)}{x-1}\right)=\exp(x)\,.$$
This shows that
$$y'(x)-y(x)=-a\,(x-1)+(x-1)\,\exp(x)\text{ for some constant }a\,.$$
As a result,
$$\frac{\text{d}}{\text{d}x}\,\big(\exp(-x)\,y(x)\big)=-a\,(x-1)\,\exp(-x)+(x-1)\,.$$
In other words, there exists a constant $b$ for which
$$y(x)=\exp(x)\Bigg(a\,x\,\exp(-x)+b+\frac{1}{2}\,(x-1)^2\Biggr)=a\,x+b\,\exp(x)+\frac{1}{2}\,(x-1)^2\,\exp(x)\,.$$
More generally, let the differential equation $$y''(x)+p(x)\,y'(x)+q(x)\,y(x)=r(x)$$
satisfy $k^2+k\,p+q=0$. Then, a homogeneous solution is $y(x)=\exp(k\,x)$. In fact, all homogeneous solutions are of the form
$$y(x)=A\,\exp(k\,x)+B\,\exp(k\,x)\,\int\,\exp\big(-2\,k\,x-P(x)\big)\,\text{d}x\,,$$
where $P(x):=\displaystyle\int\,p(x)\,\text{d}x$. For the nonhomogeneous equation, a particular solution is
$$y(x)=\exp(k\,x)\,\int\,\exp\big(-2\,k\,x-P(x)\big)\,R(x)\,\text{d}x\,,$$
where $R(x):=\displaystyle\int\,\exp\big(k\,x+P(x)\big)\,r(x)\,\text{d}x$.
Notice that $k=1$ works with $p(x):=-\dfrac{x}{x-1}$ and $q(x):=\dfrac{1}{x-1}$. Here, $P(x)=-x-\ln(x-1)$ (for an appropriate integral constant). For $r(x):=(x-1)\,\exp(x)$, we get that $R(x)=\exp(x)$ (for a good integral constant). Continuing from here yields a similar result, as before.