Here's an outline of one way to do it. (I haven't checked details such as what to do if .)

Let . Then , and say.

The equation then becomes . Compare the constant term and the coefficient of y on both sides to get the equations and . Deduce from these that . It follows that either or . In either case, you can deduce that , from which it easily follows that all three linear polynomials are multiples of each other.