How is $\lim_{x \to a}\left(\frac{x^n - a^n}{x - a}\right) = n\times a^{n-1}$? 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. 

To adress your question. In the expression
$$
(x - a)\cdot(x^{n-1} + x^{n-2}\cdot a + x^{n-3}\cdot a^2 + x^{n-4}\cdot a^3 + \cdots + x^1\cdot a^{n-2} + a^{n-1})
$$ you may just expand it as
$$
x \cdot \left(x^{n-1} + x^{n-2}\cdot a + x^{n-3}\cdot a^2 + x^{n-4}\cdot a^3 + \cdots + x^1\cdot a^{n-2} + a^{n-1}\right)
$$ giving

$$\left(x^n + x^{n-1}\cdot a + x^{n-2}\cdot a^2 + x^{n-3}\cdot a^3 + \cdots + x^2\cdot a^{n-2} + x\cdot a^{n-1}\right)
$$ 

then substract
$$
a\cdot(x^{n-1} + x^{n-2}\cdot a + x^{n-3}\cdot a^2 + x^{n-4}\cdot a^3 + \cdots + x^1\cdot a^{n-2} + a^{n-1})
$$ that is substract

$$
(x^{n-1}\cdot a + x^{n-2}\cdot a^2 + x^{n-3}\cdot a^3 + x^{n-4}\cdot a^4 + \cdots + x^1\cdot a^{n-1} + a^n)
$$ 

then you can see that all terms cancel except

$$
x^n-a^n.
$$

