In my book this is termed as a theorem and the proof given is as follows :-
$$\begin{align} \lim_{x \to a}\left(\frac{x^n - a^n}{x - a}\right) &=\lim_{x \to a}\left(\frac{(x - a)*(x^{x-1} + x^{n-2}*a + x^{n-3}*a^2 + x^{n-4}*a^3 + \cdots + x^1*a^{n-2} + a^{n-1})}{x - a}\right) \\ &=(a^{n-1} + a*a^{n-2} + \cdots + a^{n-1}) \\ &=(a^{n-1} + a^{n-1} + \cdots + a^{n-1}) \\ &=(n*a^{n-1}). \end{align}$$
Everything made sense to me except
$$x^n - a^n = (x - a)*(x^{x-1} + x^{n-2}*a + x^{n-3}*a^2 + x^{n-4}*a^3 + \cdots + x^1*a^{n-2} + a^{n-1})$$
Somebody please enlighten me on this topic.