Prove that $\frac{1}{a(a-b)(a-c)} +\frac{1}{b(b-c)(b-a)} +\frac{1}{c(c-a)(c-b)} =\frac{1}{abc}$ for all sets of distinct nonzero numbers $a,b,c$. 
Prove that $$\cfrac{1}{a(a-b)(a-c)} +\cfrac{1}{b(b-c)(b-a)}
 +\cfrac{1}{c(c-a)(c-b)} =\cfrac{1}{abc}$$ for all sets of distinct nonzero numbers  $a,b,c  $.

Now my question is not about how to solve this but rather why the technique which shows my book works.
Technique:

Rather than showing that the left side equals $\cfrac{1}{abc}$,we show
   that  $$\cfrac{1}{a(a-b)(a-c)} +\cfrac{1}{b(b-c)(b-a)}
 +\cfrac{1}{c(c-a)(c-b)} -\cfrac{1}{abc}=0 $$
Writing the left side with the common denominator
   $abc(a-b)(a-c)(b-c)$,we have
   $$\cfrac{bc(b-c)-ac(a-c)+ab(a-b)-(a-b)(a-c)(b-c)}{abc(a-b)(a-c)(b-c)}=0$$
We can show that this is $0$ by showing that the numerator is $0$.We
  can do this by looking at the numerator as a polynomial in $c$,meaning
  let $a$ and $b$ be constants and $c$ be a variable,or
  $$f(c)=bc(b-c)-ac(a-c)+ab(a-b)-(a-b)(a-c)(b-c)$$
Since $f(c)$ is a quadratic equation ,if we can show that this
  quadratic has $3$ different roots,then $f(c)=0$ for all $c$.

The proof ends up with showing that $f(a)=0$,$f(b)=0$ and $f(0)=0$.
Now,while I can understand why a quadratic with $3$ roots is the zero polynomial I can't understand why we can treat the numerator as a polynomial and so treat $a,b$ as constants while $c$ as a variable.
Furthermore when we let it be a polynomial we also let $c=a=b$ but the problem in the beginning states that ${a,b,c}$ is all sets of distinct nonzero numbers,so I thought that we can't let $c=a=b$ by definition.
So can someone explain in depth why this is legit to do ?

For a proof that might satisfy a thirst for more symmetry, but which uses a very similar technique, consider the equivalent identity $$\cfrac{bc}{(a-b)(a-c)} +\cfrac{ac}{(b-c)(b-a)} +\cfrac{ab}{(c-a)(c-b)} =1.$$ Let $f(x)$ be the polynomial function defined by $$f(x) = \cfrac{(x-b)(x-c)}{(a-b)(a-c)} +\cfrac{(x-c)(x-a)}{(b-c)(b-a)} +\cfrac{(x-a)(x-b)}{(c-a)(c-b)}.$$ Observe that $f$ is a quadratic polynomial with $f(a)=f(b)=f(c)=1$. It follows that $f(x)-1$ is a quadratic with three roots, so $f(x)-1=0$ identically. Now compare constant terms of the identity $f(x)=1$.
