For Type1 we will get need matrix as <1,2,2> i.e.,need=(max-used). for type1 again total used =1+1+2=4 .Therefore difference is max resource-total used=1.here 1 can satisfy P1 so safe state sequence becomes
<p1,p2,p3>
Likewise for Type2 safestate sequence will be <p2,p1,p3>
I think ans is B
correct me if im wrong