Method #1. u-substitution.
Let \(\displaystyle \L u = x - 1.\) Then \(\displaystyle \L du=dx\) and \(\displaystyle \L x=u+1.\)
\(\displaystyle \L \qquad\begin{eqnarray*}
\int\frac{x^2}{x-1}\,dx
&=&\int\frac{(u+1)^2}{u}\,du\\
&=&\int\frac{u^2+2u+1}{u}\,du\\
&=&\int\left(u+2+\frac1u\right)\,du
\end{eqnarray*}\)
and so on.
Method #2. a "clever" separation.
\(\displaystyle \L \qquad\begin{eqnarray*}
\int\frac{x^2}{x-1}\,dx
&=&\int\frac{x^2-1+1}{x-1}\,du\\
&=&\int\frac{x^2-1}{x-1}\,dx+\int\frac{1}{x-1}\,dx\\
&=&\int\frac{(x-1)(x+1)}{x-1}\,dx+\int\frac{1}{x-1}\,dx\\
&=&\int(x+1)\,dx+\int\frac{1}{x-1}\,dx
\end{eqnarray*}\)
The rest is history...