We have to assume that he does all this with his eyes closed, and so his selections are completely random.
-- There are 26 socks in the drawer all together. -- 10 of them are black or brown. -- So the probability that he pulls out either a black sock or a brown one is
10/26 = 5/13 = about 38.5% .
-- He puts it back, so there are still 26 socks in the drawer.
-- 16 of them are white. -- So now, the probability of pulling out a white one is
16/26 = 8/13 = about 61.5% .
The probability of the whole process happening just exactly as you described it is
(10/26) x (16/26)
= (5/13) x (8/13)
= (40) / (13²) = 40/169 = about 23.7% .
Quick check:
We got 38.5% the first time, and 61.5% the second time.
(38.5%) x (61.5%)
= (0.385 x 0.615)
= 0.2367 ==> 23.7% <== yay! that's good enough for me