5. Let $f(x)=x^{3}+a x^{2}+b x+c$, where $a, b$ and $c$ are distinct non-zero integers. For which $a, b$ and $c$ do the equalities $f(a)=a^{3}$ and $f(b)=b^{3}$ hold?
Answer: $a=-2, b=4, c=16$.

Solution. The equalities $f(a)=a^{3}$ and $f(b)=b^{3}$ give us the equalities $a^{3}+a b+c=0$ and $a b^{2}+b^{2}+$ $c=0$. Subtracting one from the other, we get $(a+1) b^{2}-a b-a^{3}=0$. This expression can be factored as

$$
(a+1) b^{2}-a b-a^{3}=(b-a)\left((a+1) b+a^{2}\right)=0
$$

Since $a$ and $b$ are distinct, $(a+1) b+a^{2}=0$. From this, we see that $a \neq-1$. Therefore, $b=\frac{-a^{2}}{a+1}$. The number $b$ is an integer, so $a^{2}$ must be divisible by $a+1$. At the same time, the numbers $a^{2}$ and $a+1$ are coprime. Therefore, we need to consider the cases $a+1=1$ and $a+1=-1$. The first case does not work, as $a \neq 0$, the second gives the solution $a=-2, b=4, c=16$. It is easy to verify that these numbers satisfy all the conditions.

Comment. The answer is found by trial and error, it is shown that the answer satisfies all the conditions, but its uniqueness is not proven - 2 points. For arithmetic errors with correct reasoning, deduct 1-3 points. The statement “the numbers $a^{2}$ and $a+1$ are coprime” can be used without proof.