Answer
a) 5 balls
b) 13 balls
Work Step by Step
a) As there are 2 colours and we need to make sure that women gets 3 balls of same colour we need an integer n , such that [$\frac{n}{2}$] =3. The least value of n is 5 .(pigeonhole principle)
b) To be sure that she has 3 blue balls she should select 13 balls assuming that 10 of the balls out of 12 balls were red . But next selection can only be blue ball because there are no red balls left.