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

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

$$
\begin{aligned}
& a b c=\log _{\sqrt{x+34}}(2 x+23) \cdot \log _{(x+4)^{2}}(x+34) \cdot \log _{\sqrt{2 x+23}}(-x-4)= \\
& \quad=2 \log _{x+34}(2 x+23) \cdot \frac{1}{2} \log _{(-x-4)}(x+34) \cdot 2 \frac{\log _{(x+34)}(5 x-1)}{\log _{(x+34)}(-x-4)}=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 (33). 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 (34) and (35) 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 $2 x+23=(x+4)^{2}$. This equation is equivalent to the equation $x^{2}+6 x-7=0$, the roots of which are $x=1$ and $x=-7$. $x=1$ does not satisfy the domain of admissible values. For $x=-7$, $a=\log _{\sqrt{27}} 9 \neq 2$. Moreover, $a \neq 1$. Therefore, this case does not fit.

If $c=2$, then $2 x+23=-x-4$, that is, $x=-9$. The value $x=-9$ fits: $a=\log _{\sqrt{25}} 5=1$, $b=\log _{5^{2}} 25=1$.

Thus, $x=-9$ is the only solution to the problem.