I mean, how would I know that the specific value was lambda = 2 and not something else like 5
Always try the ones that make diagonal elements 0. If a diagonal element is 0, it means the matrix is either not yet in row echelon form (e.g. Plugging lambda = 2 makes the matrix require further operations to get into row echelon form, since then the third column needs to be cleared up), or we get a zero row. In either case, you'll see eventually we have a zero row (when lambda = 2, we clear the third column and get a zero row in the third row), and when (and only when) that happens, we know there's potential for a lack of a solution.
If we just sub. in something random like 5, we see that the matrix ends up being in row echelon form with all rows leading, so there is a solution then. So in summary, try and only try values that'll make diagonal elements become 0, so that there will be a zero row, leading to a possibility of no solutions.