If process Pi wants to enter into CS then it will make Flag[i]=True and turn=j. Now for while loop, consider 2 points:
(i) If we take turn=i, then it already makes condition False in while loop and thus both processes can enter simultaneously into CS. So, take turn=j
(ii) if we take flag[i]=TRUE, then the condition will become like process ' i ' wants to enter which made flag[i]=TRUE and turn=j already, so it will always remain in while loop forever. So, take Flag[j]=TRUE
Thus (B) is the answer for sure :)