Using the Discriminant to find the value of 'k'. Find the value(s) of $k$ for which the equation, $(x+2)(x+k)=-1$, has equal roots.
(I cannot get the two values as stated in the answer $k=0$ and $k=4$.
My final line of working doesn't seem to factorize, it is $k^2-4k+8=0$)

$$(x+2)(x+k)=-1\implies x^2+(k+2)x+2k+1=0$$
The discriminant of the above must be zero , thus:
$$(k+2)^2-4(2k+1)=k^2-4k=0\iff k(k-4)=0\;\ldots$$
