The second line is obtained by subtracting the second line from the third line.
0 λ- 10 5 1
0 -2 1 λ+ 12 3
1 10 -6 1
Then, the line 1 is multiplied by -3 and added to the second line to get it.
0 λ- 10 5 1
0 -3(λ-3) λ-3 0
1 10 -6 1
Therefore, when λ-3=0, that is, λ=3, the rank is 2.
In other cases, the rating is 3.