To find the rank, you need the row echelon form of the matrix. From then, the number of non-zero rows gives the rank.
Assuming you understand the calculations behind finding the row echelon form or the reduced row echelon form, here's the progression of the given matrix.
-6 1 7
-6 1 4
-12 2 11
-6 1 7
0 0 -3
0 0 -3
-6 1 7
0 0 -3
0 0 0
There are 2 non-zero rows so the rank is 2.