The quadratic polynomial $P(x)$ has a zero at $x=2$. The polynomial $P(P(x))$ has only one real zero at $x=5.$ Compute $P(0).$
If we have that $P(x) = ax^2 +bx+ c$, we get from the first condition that $P(x) = (x-2)(bx+c).$
From here $P(P(x)) = (ax+bx+c -2)(b(ax+bx+c)+c)$, but this just looks very messy and doesn't seem to be helpful at all. Is there some other trick here I'm missing?
$P(x) $ will be of the form
$$P(x)=(x-2)(ax+b).$$ Let
$$c=P(5)=3(5a+b).$$ then the equation
$$P(P(5))=(c-2)(ac+b)$$
$$=ac^2+(b-2a)c-2b=0$$
has only one root if the discriminant is zero.
$$\Delta=(b+2a)^2=0\iff b=-2a$$
and $$c=\frac{2a-b}{2a}=2$$ but $$c=3(5a+b)=9a=2$$ finally $$a=\frac 29\; \;,\;\; b=-\frac 49\;\;$$ $$\boxed{\;P(x)=\frac 29(x-2)^2}$$ $$P(0)=\frac 89$$