Please help. Firstly the wording of n+1 distinct values of x confuses me. Anyway

Prove that if 2 polynomials of degree n, say f(x) and g(x) are equal for n+1 distinct values of x, then the 2 polynomials are equal.

I have:

f(x)=anx^n+ an-1x^n-1 +...+ax+a0

g(x)= bnx^n+bnx^n-1 + ... + bx+b0

then i subtracted g(x) from f(x)