It's a common error, retrochic -- basically you are applying a correct point, that colour doesn't matter, but then applying it too early, with the effect that, somewhere along the line of working, you've set 2=4.
What's gone wrong? I am now going to launch into a lecture, but hopefully an instructive one.
In all problems of discrete probability, the most sensible approach to finding a solution goes something like as follows:
- write down all possible distinct outcomes in the most specific way possible;
- computer the probabilities of each of these outcomes individually;
- Only once this has been done can you turn to considering the specific question, and grouping together various outcomes according to how they fit in with the question, and computing the probability of the groups you are interested in.
Applying this procedure to the problem in question would lead us to the following worked solution:
1) I have four socks, of which I will end up selecting two.
2) I can do this first by drawing one sock, then by drawing another [Note -- this will NOT change the probabilities compared to drawing two at once, as I'll demonstrate later.].
3) In this problem we can identify two white and two black socks and I will start by treating them as distinct. Label this W, w, B and b and we obtain twelve possible specific pairs: Ww, WB, Wb, wW, wB, wb, BW, Bw, Bb, bW, bw, bB.
4) The probabilities for each of these outcomes can be determined as follows: Assume that the experiment is fair, so that the probability of drawing a sock is the same as the probability of drawing any other sock. Then the probability of drawing the first sock is always 1/4 (one sock/total number of socks); and the probability of drawing the second sock is 1/3, so that the probability of any of these pairs is exactly 1/12 -- and all 12 pairs have this probability (total probability = 1, so we have indeed exhausted the possibilities).
5) Now we should check that we haven't messed the problem up by stipulating that we draw one sock then the other. We can do this by noting that in the end, the pairs wB and Bw are the same. Thus we could instead group the possible final pairs as P(W and w) = P(w then W) +P(W then w) = 1/12 + 1/12 = 2/12 = 1/6, and so on. The relative probabilities of any distinct pairing are the same, as in Ww and Wb, etc are all still equally likely pairings. The conclusion we can reach is that from the point of view of what we end up with, whether the socks are drawn together or separately doesn't affect things.
6) NOW we apply the conditions of the specific problem: "...pull out a pair of matching socks." This means that the specific colour doesn't matter, and we can relabel the combinations as follows:
Ww = S
WB = D
Wb = D
wB = D
wb = D
Bb = S
Where S stands for same and D for different. This relabelling, crucially, is just a relabelling of the outcome and has not affected the probability of each outcome, which is still 1/6 for each.
7) Since we are interested only in matching pairs, we identify two outcomes that work, out of a total of 6 equally likely outcomes. Thus P(matching pair) = P(S =Ww) + P(S=Bb) =1/6 + 1/6 = 2/6 = 1/3.
By setting up the approach to the problem as generically as possible, we have ensured that we've not missed anything about the problem, and are led to the solution of 1/3.