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.
 A: 
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:

A: *

*$k⋅x>0$

*$x+2>0$ 

*$k⋅x=(x+2)^2$

*$b^2−2ac=0$



I am not sure what to do from here.

Well first thing is to correct 4.) $b^2-2ac = 0$ to $b^2 - 4ac=0$ (the $2$ was incorrect; it should be $4$) and then to write it in terms of $kx = (x+2)^2$
$kx = (x+2)^2$
$x^2 + (4-k)x + 4 = 0$ so $a = 1; b=4-k; c = 4$
so


*$(4-k)^2 - 16 = 0$.


Now just find the only values of $k$ where the following four are all true.


*

*$k⋅x>0$

*$x+2>0$ 

*$k⋅x=(x+2)^2$

*$(4-k)^2 - 16 = 0$


==== answer follows ======
So $(4-k)^2 = 16$
$4-k = \pm 4$
$k = 0, 8$.


*

*$kx > 0$


But if $k = 0$ then $k*x =0$.  So $k =0$ is impossible.  So $k = 8$.


*$kx = 8x = (x + 2)^2$


$8x = x^2 + 4x + 4$
$x^2 - 4x + 4 = 0$
$(x-2)^2 =0$ so 
$x = 2$


*$x + 2 = 2+ 2=4 > 0$


Yep.  That's fine.
So $k=8$ is the only value of $k$ which gives a single solution ($x =2$).
(If $k > 8$ then there will be two solutions and 4) fails (is greater than zero).  If $0< k < 8$ then 4) fails (is less than 0) and 3) has no solution.  If $k=0$ then 4) and 3) pass and there is a single solution to 3) but 1) and 2) fail so there is no overall solution.  If $k < 0$ then 4) fails (is greater than 0) and there are two solutions to 3) but 1) and 2) fail and there are no overall solution.)
