we have the fraction $\dfrac{x^2}{x^2-2x+1}$ (1) we can easily factorize the denomirator by using the polynomial's roots $\dfrac{x^2}{(x-1)^2}$ (2) now I saw somewhere that you can even simplify further to $1 + \dfrac{2x-1}{(x-1)^2}$ (3).
How are the intermediate steps between (2) and (3)?
From (2) we have: $$\frac{x^2}{(x-1)^2}=\frac{(x^2-2\cdot x+1)+(2\cdot x-1)}{(x-1)^2}=\frac{x^2-2\cdot x+1}{(x-1)^2}+\frac{2\cdot x-1}{(x-1)^2}=1+\frac{2\cdot x-1}{(x-1)^2}$$ So, we have ended to (3).