This is the current safe state.

AVAILABLE 
X=3, Y=2, Z=2 




MAX 
ALLOCATION 

X Y Z 
X Y Z 
P0 
8 4 3 
0 0 1 
P1 
6 2 0 
3 2 0 
P2 
3 3 3 
2 1 1 
Now, if the request REQ1 is permitted, the state would become :

AVAILABLE 
X=3, Y=2, Z=0 






MAX 
ALLOCATION 
NEED 

X Y Z 
X Y Z 
X Y Z 
P0 
8 4 3 
0 0 3 
8 4 0 
P1 
6 2 0 
3 2 0 
3 0 0 
P2 
3 3 3 
2 1 1 
1 2 2 
Now, with the current availability, we can service the need of P1. The state would become :

AVAILABLE 
X=6, Y=4, Z=0 






MAX 
ALLOCATION 
NEED 

X Y Z 
X Y Z 
X Y Z 
P0 
8 4 3 
0 0 3 
8 4 0 
P1 
6 2 0 
3 2 0 
0 0 0 
P2 
3 3 3 
2 1 1 
1 2 2 
With the resulting availability, it would not be possible to service the need of either P0 or P2, owing to lack of Z resource. Therefore, the system would be in a deadlock. ⇒ We cannot permit REQ1. Now, at the given safe state, if we accept REQ2 :

AVAILABLE 
X=1, Y=2, Z=2 






MAX 
ALLOCATION 
NEED 

X Y Z 
X Y Z 
X Y Z 
P0 
8 4 3 
0 0 1 
8 4 2 
P1 
6 2 0 
5 2 0 
1 0 0 
P2 
3 3 3 
2 1 1 
1 2 2 
With this availability, we service P1 (P2 can also be serviced). So, the state is :

AVAILABLE 
X=6, Y=4, Z=2 






MAX 
ALLOCATION 
NEED 

X Y Z 
X Y Z 
X Y Z 
P0 
8 4 3 
0 0 1 
8 4 2 
P1 
6 2 0 
5 2 0 
0 0 0 
P2 
3 3 3 
2 1 1 
1 2 2 
With the current availability, we service P2. The state becomes :

AVAILABLE 
X=8, Y=5, Z=3 






MAX 
ALLOCATION 
NEED 

X Y Z 
X Y Z 
X Y Z 
P0 
8 4 3 
0 0 1 
8 4 2 
P1 
6 2 0 
5 2 0 
0 0 0 
P2 
3 3 3 
2 1 1 
0 0 0 
Finally, we service P0. The state now becomes :

AVAILABLE 
X=8, Y=5, Z=4 






MAX 
ALLOCATION 
NEED 

X Y Z 
X Y Z 
X Y Z 
P0 
8 4 3 
0 0 1 
0 0 0 
P1 
6 2 0 
5 2 0 
0 0 0 
P2 
3 3 3 
2 1 1 
0 0 0 
The state so obtained is a safe state. ⇒ REQ2 can be permitted. So, only REQ2 can be permitted. Hence, B is the correct choice.