in figure (a) process P1 requesting R1 and holding R2, process P2 requesting R3 and holding R2 , process P3 requesting R2 and holding R3.
so all P1, P2 , P3 are in Deadlock .
In figure (b) process P1 requesting R1 and holding R2, process P2 holding R1, process P3 requesting R2 and holding R1, and process P4 holding R2, so P4 can release R2 which can later obtain by P3.
P2 can release R1 which can later obtain by P1.
so they are not in Deadlock.
Hence answer is C, Deadlock occurs in fig (a), but not in fig (b).