Hi Habeeba,
This is like the sock problem but with more choices
so we have 12 balls in total
how many ways can we draw two balls
12 * 11 = 132 (so there are 132 possible ways we can draw two balls from the bag
now how many ways can we draw two of the same color
Two w (white)
3 * 2 = 6
Two b (blue)
4 * 3 = 12
Two g (green)
5 * 4 = 20
so if we combine all of these possibilities we have
38 ways that we can draw two balls of the same color out of a total of 132 ways to draw two balls.
our probability becomes 38/132
19/66
or 27.79%
Hope this helps