Example 5. Solve the equation:
a) $\log _{1 / 5} \frac{2+x}{10}=\log _{1 / 5} \frac{2}{x+1}$;

b) $\log _{3}\left(x^{2}-4 x+3\right)=\log _{3}(3 x+21)$;

c) $\log _{1 / 10} \frac{2 x^{2}-54}{x+3}=\log _{1 / 10}(x-4)$;
d) $\log _{(5+x) / 3} 3=\log _{-1 /(x+1)} 3$.
Solution. a) Equation (6) is equivalent to the system

$$
\left\{\begin{array}{l}
x+1>0 \\
\frac{2+x}{10}=\frac{2}{x+1}
\end{array}\right.
$$

The equation of the system has two roots: $x_{1}=3, x_{2}=-6$. However, only the number $x_{1}=3$ satisfies the first condition. Thus, equation (6) has a single root, the number 3.

b) Equation (7) is equivalent to the system

$$
\begin{aligned}
& \left\{\begin{array} { l } 
{ 3 x + 2 1 > 0 , } \\
{ x ^ { 2 } - 4 x + 3 = 3 x + 2 1 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x>-7, \\
x^{2}-7 x-18=0
\end{array} \Leftrightarrow\right.\right. \\
& \Leftrightarrow\left\{\begin{array} { l } 
{ x > - 7 } \\
{ [ \begin{array} { l } 
{ x = - 2 , } \\
{ x = 9 }
\end{array} }
\end{array} \Leftrightarrow \left[\begin{array}{l}
x=-2 \\
x=9
\end{array}\right.\right.
\end{aligned}
$$

Therefore, the set of all solutions to equation (7) consists of two numbers: $x_{1}=-2, x_{2}=9$.

c) Equation (8) is equivalent to the system

$$
\begin{aligned}
& \left\{\begin{array} { l } 
{ x - 4 > 0 , } \\
{ \frac { 2 x ^ { 2 } - 5 4 } { x + 3 } = x - 4 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x>4 \\
\frac{2 x^{2}-54-(x-4)(x+3)}{x+3}=0
\end{array} \Leftrightarrow\right.\right. \\
& \Leftrightarrow\left\{\begin{array} { l } 
{ x > 4 } \\
{ \frac { 2 x ^ { 2 } - 5 4 - x ^ { 2 } + x + 1 2 } { x + 3 } = 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x>4 \\
\frac{x^{2}+x-42}{x+3}=0
\end{array} \Leftrightarrow\right.\right. \\
& \\
& \Leftrightarrow\left\{\begin{array}{l}
x>4 \\
\frac{(x+7)(x-6)}{x+3}=0
\end{array} \Leftrightarrow x=6\right.
\end{aligned}
$$

Thus, equation (8) has a single root, the number 6.
d) Equation (9) is equivalent to the mixed system

$$
\left\{\begin{array}{l}
\frac{5+x}{3}>0 \\
\frac{5+x}{3} \neq 1 \\
\frac{5+x}{3}=\frac{-1}{x+1}
\end{array}\right.
$$

The equation of the system has two roots: $x_{1}=-4, x_{2}=-2$. The number $x_{1}=-4$ satisfies all the conditions of the system, while for the number $x_{2}=-2$, the condition $\frac{5+x}{3} \neq 1$ is not met. Thus, equation (9) has one root, the number $x_{1}=-4$.

An equation of the form

$$
\log _{g(x)} f(x)=b
$$

is equivalent to the mixed system

$$
\left\{\begin{array}{l}
g(x)>0 \\
g(x) \neq 1 \\
f(x)=g(x)^{b}
\end{array}\right.
$$