Answer: At most 3
Step-by-step explanation:
If there are 25 white socks and 25 red socks, a matching pair would be picked in at most 3 times.
The first sock you pick would be either White or Red
The second sock you pick would be either white or red again which means that you now either have 2 whites, 2 reds or 1 white and 1 red.
The third sock you pick will either be white or red once more. At this point you will either have 3 whites, 3 reds, 2 whites and 1 red or 2 reds and 1 white.
You will therefore have at least a matching pair after 3 tries.