HI!
First of all, there are total 9 + 8 + 7 = 24 socks.
Probability of a black socks in a row is 9/24
Probability of the second black socks without replacement, if first one was black, is 8/23
Therefore the probability of the 2 black socks in a row are 3/23 (I multiplied the two)
Using the same technique, the p of 2 gray socks are 7/69
The p of 2 blue socks are 7/92
Now you add them up, and you get 85/276 as your answer
Let me know if there are any other questions!