On Princeton's Analysis of Algorithms, they discuss solving recurrence relations and they come across a line that I can't seem to decipher
\begin{align} n(n-1)a_n &=(n-1)(n-2)a_{n-1} + 2(n-1)\\ &=(n-2)(n-3)a_{n-2}+2(n-2)+2(n-1)\\ &=2(1+2+\cdots+n-1)\\ &=n(n-1)\\ a_n&=1 \end{align}
Basically lines (1) through (4) I am not sure how they are making those simplifications. If it's a matter of reading up on some literature a reference would be greatly appreciated.