First we do transpose of Q here .
So Q[j,i] = Q[i,j]
Now after doing transpose operation , Q has become upper triangular matrix .
Now the thing is contents of lower triangular matrix P will remain as it is in the R , so the indices of P will remain as it is in R as well..
As a result we have to store the elements of Q one column right in R w.r.t to original column in upper triangular matrix Q .
Hence
R[j,i+1] = Q[j,i] where Q[j,i] represents element of upper triangular matrix Q after doing transpose operation on it.Thus w.r.t. original matrix Q which is lower triangular matrix :
R[j,i+1] = Q[i,j]
Hence B) should be the correct option .