Don’t use formulas until and unless it’s necessary!
This can easily be solved with the help of intuition. Ultimately, we want that at least one process should get executed completely, so 1st process consumes 3 resources. We are left with 3 more, now if we take 2 more processes then what might happen is each of 3 processes consume 2-2 resources each because of which deadlock occurs. So, at max only 1 more process we can select and it will be consuming the remaining 3 resources. So, total of 2 processes which give n =2, option A. I hope it helped. :)