1. Three socks (not 12) is enough to ensure you have at least one white or black pair.
2. Six socks. It is not enough to grab five socks, because you could have, for instance, three black socks, one white sock, and one red sock, which includes only one matching pair.
3. Pull one sock out of the box labeled “Black & White.” You know this box is mislabeled, so if the sock is white, for instance, then it actually contains all white socks. In that case, one of the other two boxes—which are labeled “Black” and “White”—must contain black and white socks, and the other box must contain just black socks. Since all boxes are mislabeled, the box labeled “Black” cannot contain all black socks, which leaves just one possibility: The box labeled “Black” contains black and white socks, and the box labeled “White” contains just black socks.