Thankslook at yellow pens
[MATH]P[\text{choose two yellow pens}] = \dfrac{3}{9}\dfrac{2}{8} = \dfrac{1}{12}[/MATH]
On the first draw there are 3 yellow pens out of 9 pens total.
On the second draw there are 2 yellow pens out of 8 pens total.
Now you do the calculation for red pens.
Add the two for the total probability of drawing two like colored pens.
(Hopefully it's clear you won't draw two black pens)