This problem is from my Gelfand's Algebra book.

Problem 164. Prove that a polynomial of degree not exceeding 2 is defined uniquely by three of its values.

This means that if and are polynomials of degree not exceeding 2 and for three different numbers then the polynomials and are equal.

I'm not very good at proofs, so I have questions. If I show that if is true and and are polynomials of degree not exceeding 2, then and are equal, will it prove that a polynomial of degree not exceeding 2 is defined uniquely by three of its values?

Is this the way to go?

Let , After that , because , so are roots of which can't have more than two roots. Here I'm confused, I shouldn't have assumed that was true, right?