Equation involving the logarithm Find the set of values of $k$ satisfying this equation for only one real root of $x.$
$$ \log(kx) = 2 \log(x+2)$$
I think that for the sake of satisfying the domain restriction:


*

*$ k \cdot x > 0 $

*$x+2 > 0$

*$ k \cdot x = (x+2)^2$

*$ b^2-2ac = 0$.


I am not sure what to do from here.


Find the set of values of $k$ satisfying
    \begin{align}  \log(kx) &= 2
  \log(x+2) \tag{1}\label{1} 
  \end{align} 
  for only one real root of $x$.

Equation 
\begin{align} 
k \cdot x &= (x+2)^2
\tag{2}\label{2}
\end{align}
follows from \eqref{1}
and can be transformed as
\begin{align} 
(x+2)^2 -kx&=0
\\
(x+2)^2 -k(x+2)+2k&=0
\end{align}
with the roots
\begin{align} 
x+2&=\tfrac12\,k\pm\tfrac12\sqrt{k^2-8k}
\tag{3}\label{3}
.
\end{align}
The domain restrictions
\begin{align} 
kx&>0
\tag{4}\label{4}
,\\
x+2&>0
\tag{5}\label{5}
\end{align}  
suggest that we need to consider two cases:
\begin{align} 
\text{Case 1. }\quad
k&>0,\quad x>0
\tag{6}\label{6}
,\\
\text{Case 2. }\quad
k&<0,\quad x\in(-2,0)
\tag{7}\label{7}
.
\end{align}  
In the first case 
there is only one value ($k=8$) that is useful for \eqref{1}.  
In the second case,
when $k<0,\quad x\in(-2,0)$,
since the left-hand side of \eqref{3} 
is positive, 
we need to check,
for which values of negative $k$ 
\begin{align} 
x+2&=\tfrac12\,k+\tfrac12\sqrt{k^2-8k}
\tag{8}\label{8}
\end{align} 
holds.
From equation \eqref{8} and condition \eqref{7},
\begin{align} 
0&<\tfrac12\,k+\tfrac12\sqrt{k^2-8k}
<2
\tag{9}\label{9}
\end{align} 
Let $\kappa=-k$, $\kappa>0$. Then
condition
\begin{align} 
0&<-\tfrac12\,\kappa+\tfrac12\sqrt{\kappa^2+8\kappa}
\end{align}
always holds for any $\kappa>0$, that is, 
for any $k<0$.
Next, consider
\begin{align} 
-\tfrac12\,\kappa+\tfrac12\,\kappa\,\sqrt{1+\frac8\kappa}
<2
,\\
-\kappa+\kappa\,\sqrt{1+\frac8\kappa}
<4
,\\
\kappa\,\sqrt{1+\frac8\kappa}
<4+\kappa
,\\
\kappa^2+8\kappa
<16+8\kappa+\kappa^2
,
\end{align}
which also holds for all $\kappa>0$, that is, for all $k<0$
.
Summarizing, 
the answer is:
\begin{align} 
k\in(-\infty,0)\cup\{8\}
.
\end{align}
Illustration for the Case 1:

Illustration for the Case 2:

