5. [5 points] Given the numbers $\log _{\sqrt{29-x}}\left(\frac{x}{7}+7\right), \log _{(x+1)^{2}}(29-x), \log _{\sqrt{\frac{x}{7}+7}}(-x-1)$. For which $x$ are two of these numbers equal, and the third one greater than them by 1?
Answer: $x=-7$.

Solution. From the condition, it follows that the functions $\frac{x}{7}+7, 29-x, -x-1$ are positive and do not take the value 1 for all $x$ in the domain of admissible values. Let $a=\log _{\sqrt{29-x}}\left(\frac{x}{7}+7\right), b=\log _{(x+1)^{2}}(29-x), c=$ $\log _{\sqrt{\frac{x}{7}+7}}(-x-1)$. Then

$$
\begin{aligned}
& a b c=\log _{\sqrt{29-x}}\left(\frac{x}{7}+7\right) \cdot \log _{(x+1)^{2}}(29-x) \cdot \log \sqrt{\frac{x}{7}+7}(-x-1)= \\
& \quad=2 \log _{29-x}\left(\frac{x}{7}+7\right) \cdot \frac{1}{2} \log _{(-x-1)}(29-x) \cdot 2 \frac{\log _{29-x}(-x-1)}{\log _{29-x}\left(\frac{x}{7}+7\right)}=2
\end{aligned}
$$

By the condition, the numbers $(a ; b ; c)$ satisfy one of the three conditions:

$$
\begin{aligned}
& a=b \text { and } \quad a=c-1 \\
& b=c \text { and } c=a-1 \\
& c=a \text { and } \quad a=b-1
\end{aligned}
$$

Consider case (38). Substituting $b=a$ and $c=a+1$ into the equation $a b c=2$, we have $a \cdot a \cdot(a+1)=2$, from which $a^{3}+a^{2}-2=0,(a-1)\left(a^{2}+2 a+2\right)=0$. Since the polynomial $a^{2}+2 a+2$ has no roots, the only solution to the equation is $a=1$, so the system is satisfied by the triplet of numbers $a=1, b=1, c=2$. Cases (39) and (40) are considered similarly; from them we get that either $a=2, b=1, c=1$, or $a=1, b=2, c=1$. Now, for each of the obtained triplets of numbers $(a ; b ; c)$, we will find $x$.

If $c=1$, then $\frac{x}{7}+7=x^{2}+2 x+1$. This equation is equivalent to the equation $7 x^{2}+13 x-42=0$, the roots of which are $x=-\frac{-13 \pm \sqrt{1345}}{14}$. The larger root does not satisfy the domain of admissible values, and for the smaller root $a \neq 1$ and $a \neq 2$, so it also does not fit.

If $c=2$, then $\frac{x}{7}+7=-x-1$, that is, $x=-7$. The value $x=-7$ fits: $a=\log _{\sqrt{36}} 6=1, b=\log _{6^{2}} 36=1$. Thus, $x=-7$ is the only solution to the problem.