Consider the equality $(f(x))^2 = f(f(x)).$
Let $f(x) = a_0 x^n + a_1 x^{(n-1)} + a_2 x^{(n-2)} + a_3 x^{(n-3)} +\ldots+ a_n$
Note that the degree of $(f(x))^2 = 2n$ and the degree of $f(f(x)) = n^2$
Since $(f(x))^2 = f(f(x)),$ we have $2n = n^2$ .
$\implies n= 2.$
So, $f(x) = a_0 x^2 + a_1 x + a_2 $
Now, we have the equality $f(x^2) = (f(x))^2$
Now, $f(x^2) = a_0 x^4 + a_1 x^2 +a_2$ and
$(f(x))^2 = a_0^2 x^4 + 2 a_0a_1 x^3 + (2 a_0a_2 + a_1^2 ) x^2 + 2 a_1a_2 x + a_2^2.$
Now we have,
$a_0 x^4 + a_1 x^2 +a_2 = a_0^2 x^4 + 2 a_0a_1 x^3 + (2 a_0a_2 + a_1^2 ) x^2 + 2 a_1a_2 x + a_2^2\quad \to (1)$
Now the coefficient of $x^3$ in L.H.S. is $0$ and the coefficient of $x^3$ in R.H.S. is $2a_0a_1.$
So, $2 a_0a_1 = 0.$
Hence, $a_1 = 0$ $($because $a_0$ can not be $0$ since it is the leading coefficient$)$
Now we have by putting $a_1 = 0$ in equation $(1)$
$a_0 x^4 + a_2 = a_0^2 x^4 + 2 a_0a_2 x^2 + a_2^2 \quad \to(2)$
Similarly, by comparing the coefficients of $x^2$ on both sides we get $a_2 = 0.$
So, equation $(2)$ becomes
$a_0 x^4 = a_0^2 x^4$
$\implies a_0 = a_0^2$
$\implies a_0 = 1.$
So, the required polynomial function is $f(x) = x^2$
Hence, there is only one polynomial which $x^2$
So, option B is correct.