You have not mantioned whether the system you are dealing with is homogeneous or non homogeneous.

In case of NON-HOMOGENEOUS SYSTEM:

The system has no solution if the rank of the matrix is not equal to the rank of the augmented matrix.

here if K is not equal to -5 than the rank of the matrix of the augmented matrix becomes 3 whereas the rank of the matrix of coefficients is 2,so the systems becomes inconsistent.That is why the value of k must be -5 for the solution to exist incase of a non-homogeneous system.