Given that the equation x ^ 2 + kx-3 = 0 and x ^ 2 + 4x = k-1 have the same root, find K and the same root

Given that the equation x ^ 2 + kx-3 = 0 and x ^ 2 + 4x = k-1 have the same root, find K and the same root

Solution: if two equations have the same root, the two equations should be equal
x^2+kx-3=x^2+4x+1-k
(k-4)x=4-k
x=-1
Substitute k = - 2