X= number of socks (22 items are white socks)
The probability of getting a pair of white socks when selecting two times is 15 %, thus P(white pair) = 0.15.
If P1 (white) is the probability to get a white sock on the first pull, and P2 (white) is the probability to obtain a white sock on the second pull, then following applies:
P1 (white) * P2 (white) = 0,15
With P1 (white) = 22 / x and P2 (white) = 21 / (x-1)
This can be illustrated in the following equation which we transform in a way that a zero is left on one side.