We want a function with three factors. That way, the whole thing will be zero whenever any one of the factors is zero, and we can control each factor so that it's zero when we want it to be zero.
We want one factor to be zero when x is 3, and another factor to be zero when x is 3, and another factor to be zero when x is -7.
No praaahblum !
First factor: (x-3) .
Second factor: (x-3) .
Third factor: (x+7) .
See how that works ?
When we multiply these factors all together, we get the polynomial function.
(x-3) (x-3) (x+7) = x³ + x² - 33x + 63 = f(x)
That's the polynomial function you're looking for.