Imagine that he lays the $12$ widgets out on the table in a line and works his way down the line until he finds the third defective widget. There are $12!$ possible orders in which he can line them up, and they’re all equally likely. To find the probability that he needs to test at least $9$ of the widgets, we need to count the arrangements in which he hasn’t found all three defective widgets amongst the first $8$ in the line. The easiest way to do this is to count the arrangements in which he does find them amongst the first $8$.
If the defective widgets are amongst the first $8$, there are $\binom83$ possible sets of positions for them. They can occur in any of $3!$ orders within these $3$ positions, and the $9$ good widgets can appear in any of $9!$ orders in the other $9$ positions in the line, so there are altogether
$$\binom83\cdot3!\cdot9!=\frac{8!\cdot3!\cdot9!}{3!\cdot5!}=\frac{8!\cdot9!}{5!}$$
arrangements in which he finds the defective widgets amongst the first $8$. The probability that he does so is therefore
$$\frac{\frac{8!\cdot9!}{5!}}{12!}=\frac{8!\cdot9!}{5!\cdot12!}=\frac{8\cdot7\cdot6}{12\cdot11\cdot10}=\frac{2\cdot7}{11\cdot5}=\frac{14}{55}\;,$$
and the probability that he needs to test at least $9$ of the widgets must then be
$$1-\frac{14}{55}=\frac{41}{55}\;.$$
You can work (B) in exactly the same way.