A polynomial P(x)P(x) has some number alphaα as a zero if and only if x-alphax−α is a factor of P(x)P(x). To generate a polynomial with desired zeros, then, we can multiply any such factors.
As our desired polynomial has -2−2 as a zero, it must have a factor of x-(-2) = x+2x−(−2)=x+2. As no other specific zero is given, we can make that choice ourselves. Suppose the other zero (possibly also being -2−2), is kk. Then the polynomial would be
P(x) = (x+2)(x-k)P(x)=(x+2)(x−k)
=x^2+(2-k)x - 2k=x2+(2−k)x−2k
Choosing any value for kk will give a degree 22 polynomial with -2−2 as a zero. For example, k=0k=0 gives x^2+2xx2+2x, or k=2k=2 gives x^2-4x2−4. Multiplying by any nonzero constant also will result in a valid polynomial.