Let A = Event that both balls are red
A occurs when we choose 2 of the 4 red balls
$ |A| = \binom{4}{2} $
Let B = Event that both balls have the same color
B occurs when we choose 2 of the 5 blue balls or 2 of the 4 red balls
$ |B| = \binom{5}{2} + \binom{4}{2} $
Let $A \cap B$ = Event that both balls are red and both balls have the same color
$ |A \cap B| = \binom{4}{2} $