Problem 5. Let $f(x)=7 x^{2}+6 x-2$. Solve the equation $f(f(x))=x$.

---

The provided text has been translated while preserving the original formatting and line breaks.
Answer: $-1, \frac{2}{7}, \frac{-7 \pm \sqrt{77}}{14}$.

First solution. The number $x$ satisfies the equation $f(f(x))=x$ if and only if there exists a number $y$ such that the system

$$
\left\{\begin{array}{l}
7 x^{2}+6 x-2=y \\
7 y^{2}+6 y-2=x
\end{array}\right.
$$

is satisfied. Subtracting the second equation from the first, after transformations we get $7(x-y)(x+y+1)=0$, from which either $y=x$, or $y=-x-1$. Substituting $y$ into the first equation of the system. In the first case, we get the equation $7 x^{2}+5 x-2=0$, from which $x=-1$ or $x=\frac{2}{7}$. In the second case, we get the equation $7 x^{2}+7 x-1=0$, from which $x=\frac{-7 \pm \sqrt{77}}{2 \cdot 7}=\frac{-7 \pm \sqrt{77}}{14}$

Plan of the second solution. We will honestly calculate $f(f(x))-x$:

$\left(7\left(7 x^{2}+6 x-2\right)^{2}+6\left(7 x^{2}+6 x-2\right)-2\right)-x=343 x^{4}+588 x^{3}+98 x^{2}-133 x+14=7\left(49 x^{4}+84 x^{3}+14 x^{2}-19 x+2\right)$, i.e., the original equation is equivalent to

$$
49 x^{4}+84 x^{3}+14 x^{2}-19 x+2=0
$$

Now we can find two rational roots of this equation using the Rational Root Theorem: if $p / q,(p, q)=1$ is a root of a polynomial with integer coefficients, then $p$ is a divisor of the constant term, and $q$ is a divisor of the leading coefficient. We get:

$$
49 x^{4}+84 x^{3}+14 x^{2}-19 x+2=(x+1)(7 x-2)\left(7 x^{2}+7 x-1\right)
$$

The roots of the third factor can be found using the quadratic formula.