Let $f(x)$ and $ g(x)$ be cubic polynomials with integer coefficients such that $f(a)=g(a)$ for 4 different integer values of $a$. Prove that $f(x)=g(x)$.
I am not really sure what would be helpful. I tried using the division algorithm which states that there exist unique polynomials $q(x)$ and $r(x)$ in $F[x]$ such that $f(x)=g(x)q(x)+r(x)$
then I let $a,b,d,c $ be the four integer values that let the two polynomials be equal. In each case I showed that if $f(a)=g(a)q(a)+r(a)$ then $q(a)=1$ and $r(a)=0$ for each of the integers but I don't know if that can help me show that $q(x)=1$ and $r(x)=0$
Not sure if I am on the right track here so any help will be appreciated