This is a worst-case scenario problem. He could pick one black sock and one brown sock on his first two picks. The third sock he picks must match one of the previous two, guaranteeing a pair. So, he must take out 3 socks.