It is based on one of the exercise problems from Gilbert Strang's text.
We'll Solve a general case which will automatically provide an answer to this.
Problem : Suppose the 4 by 4 matrix m has four equal rows all containing a,b,c,d. We know that Det(M)=0. The problem is to find the det(I+M) by any method
det(I+M)=$\begin{vmatrix} 1+a &b &c &d \\ a & 1+b &c &d\\ a &b & 1+c &d \\ a& b & c & 1+d \end{vmatrix}$
Now from the above determinant, Subtract row 4 from rows 1,2,3
$\begin{vmatrix} 1 &0 &0 &-1 \\ 0&1 &0 &-1 \\ 0 & 0 & 1 & -1\\ a & b &c & 1+d \end{vmatrix}$
Now, perform a(Row1)+b(Row2)+c(Row3) and subtract this from Row 4
$\begin{vmatrix} 1 &0 &0 &-1 \\ 0&1 &0 &-1 \\ 0 & 0 & 1 & -1\\ 0 & 0 &0 & 1+a+b+c+d \end{vmatrix}$
And this is an upper triangular matrix form hence determinant=1+a+b+c+d.
In our GATE question case,a=b=c=d=1 , and hence our det=1+1+1+1+1=5.
Answer-(B)