We want the two roots to be equal. This means it is a perfect square. For that, we look at the free coefficient, 49. It is square of 7 or -7.
We evaluate (x-7)2.
(x-7)2=x2-14x+49.
In order for two polynomials to be equal, their corresponding coefficient must be equal.
In our case,
-14 = -4-k
-14+4 = -k
k=10.
Using the same argument, we find the other one
14 = -4 - k
14 +4 = -k
k = -18.
Any questions?