The probability of getting a black sock out of the drawer is given by the ratio between the amount of black socks in the drawer by the total amount of socks in the drawer.
We know that we have 3 black socks, now we just need to calculate the total amount of socks. We have three black, four white, two blue, and four gray socks in a drawer, then, the total is given by
We have a total of 13 socks in the drawer, therefore, the probability of getting a black sock out of the drawer is given by
And this is the fraction in the most simplified version.