Show that $(x-1)^2$ is a factor of $x^n -nx +n-1$ 
Show that $(x-1)^2$ is a factor of $x^n -nx +n-1$

By factor theorem we know that $(x-a)$ is a factor of $f(x)$ if $f(a)=0$. 
In this case, $f(x)=x^n -nx +n-1 \implies f(1)=0$
Hence we conclude that $(x-1)$ is a factor. From hereon, how can I say that $(x-1)^2$ is a factor?  
Can we approach the problem without calculus approach? This problem was taken from a book of pre-calculus algebra.

By division theorem we have:
$$x^n -nx +n-1 = k(x)(x-1)^2+ax+b $$
So for $x=1$ we have $0 = 0+a+b$ so $a=-b$, so $$x^n -nx +n-1 = k(x)(x-1)^2+a(x-1) $$
$$(x-1)(x^{n-1}+...+x^2+x+1) -n(x-1)= k(x)(x-1)^2+a(x-1) $$
so, after dividing by $x-1$ we get $$(x^{n-1}+...+x^2+x+1) -n= k(x)(x-1)+a $$
Now puting $x=1$ again we have $$\underbrace{1+1+...+1}_n -n = 0+a\implies a=0$$
