Given the polynomials $p(x)=a x^{2}+b x+c$ and $P(x)=A x^{2}+B x+C$, we know that for any number $x$, substituting $p(x)$ into the polynomial $P$ results in $P(p(x))=x$. What is $p(P(x))$ equal to?
From the condition, it follows that every element of the range of $p(x)$ is taken exactly once. Indeed, if $p\left(x_{1}\right) = p\left(x_{2}\right)$, then $P\left(p\left(x_{1}\right)\right) = P\left(p\left(x_{2}\right)\right)$, which implies $x_{1} = x_{2}$. However, this implies that $p(x)$ must be exactly first-degree, as this property cannot hold for a second-degree or a zero-degree (constant) polynomial.

Let $x_{1}$ be a given real number. Since $p(x)$ is first-degree, its range is the set of all real numbers, so there exists a $y_{1}$ such that $p\left(y_{1}\right) = x_{1}$. Then, $p\left(P\left(x_{1}\right)\right) = p\left(P\left(p\left(y_{1}\right)\right)\right)$. According to the condition, $P\left(p\left(y_{1}\right)\right) = y_{1}$, so $p\left(P\left(p\left(y_{1}\right)\right)\right) = p\left(y_{1}\right) = x_{1}$, which means that if $x_{1}$ is a given real number, then $p\left(P\left(x_{1}\right)\right) = x_{1}$, hence $p\left(P\left(x_{1}\right)\right) = x$.

Remarks. 1. The condition itself does not uniquely determine the two polynomials. If $p(x) = bx + c$ is any first-degree polynomial (so $b \neq 0$), then $P(x) = \frac{1}{b} x - \frac{c}{b}$.

2. If we perform the substitution $P(p(x))$, then after a brief calculation,

$$
P(p(x)) = A a^{2} x^{4} + 2 A a b x^{3} + \left(2 A a c + A b^{2} + B a\right) x^{2} + (2 A b c + B b) x + A c^{2} + B c + C
$$

The statement that this can only be equal to $x$ for all $x$ if the coefficient of the first-degree term is 1 and the other coefficients are zero is not obvious. A fundamental theorem states that two polynomials, as functions, can only be equal if they are formally identical. Those who solved the problem with the above approach used this theorem at this step.