You can extract two balls of the same colour in two different way: either you pick two black balls or two red balls. Let's write the probabilities of each pick in each case.
Case 1: two black balls
The probability of picking the first black ball is 2/5, because there are two black balls, and 5 balls in total in the urn.
The probability of picking the second black ball is 1/4, because there is one black ball remaining in the urn, and 4 balls in total (we just picked the other black one!)
So, the probability of picking two black balls is
[tex] P(\text{two blacks}) = \dfrac{2}{5} \cdot \dfrac{1}{4} = \dfrac{2}{20} = \dfrac{1}{10} [/tex]
Case 2: two red balls
The probability of picking the first black ball is 3/5, because there are three red balls, and 5 balls in total in the urn.
The probability of picking the second red ball is 2/4=1/2, because there are two red balls remaining in the urn, and 4 balls in total (we just picked the other red one!)
So, the probability of picking two red balls is
[tex] P(\text{two reds}) = \dfrac{3}{5} \cdot \dfrac{1}{2} = \dfrac{3}{10} [/tex]
Finally, the probability of picking two balls of the same colour is
[tex] P(\text{same colour}) = P(\text{two blacks})+ P(\text{two reds}) = \dfrac{1}{10} + \dfrac{3}{10} = \dfrac{4}{10} = \dfrac{2}{5} [/tex]