Formulaic way to calculate the numerator of a probability mass function? Problem description

A package contains six batteries. Two of them are defective. Suppose that we randomly select three batteries and test them for defects.
What is the probability that exactly one of the three selected batteries are defective?

Determining the sample space
$ _{n}C_{r} = \frac{n!}{r!(n-r)!} = \; _{6}C_{3} = \frac{6!}{3!(6-3)!} = 20 = S $
The above determines the sample space for the first part of the problem description (we select three batteries).
Question
From manually enumerating the possible combinations from the sample space, like $ S = \{(D1, D2),\ (D1, D3)\ …\ (A5, A6)\} $; I know that the answer to the problem is:
$ P(E) = \frac{s_{e}}{S} = P(12/20) = P(3/5) = P(60 \ \%) $.
But what is the formulaic way to determine that there are $s_{e} = 12$ combinations that can contribute to our event $E$ where exactly one of the two sampled batteries are defective?
 A: There are 2 ways to get one of the bad batteries in the selected group. (2 choose 1) 
There are 6 ways (order not important) to distribute the 4 good batteries amongst the selected and non-selected groups.  (4 choose 2)
2 x 6 = 12
A: It seems as though the successful events (samples of 3 without replacement containing exactly 1 defective battery) can be formalized by simply walking through the choices to build up these sets. If we generalize the overall number of batteries to choose from to $N=6$; the sample size to $n=3$; the total number of defective batteries to $B =2$; and the number of defective batteries in the sample as $b=1$, 


*

*We look at the number of ways of selecting $b$ defective batteries when there are $B$ to choose from: $B\choose b$, or $2\choose1$ in the OP example.

*Then we turn to the number of ways of selecting the rest of the sample constituents, $n-b$, or $3-1$, from among the non-defective batteries, $N-B$, or $6 - 2$. In other words: ${N-B}\choose{n-b}$, or $4\choose2$ choices.


Together, we can formulate the number of successful events as:
$${{B}\choose{b}} {{N-B}\choose{n-b}}$$
As @whuber indicates, we are just working out the numerator in the PMF of the hypergeometric distribution with the random variable $X= b$ (in this case, $b=1$):
$$P(X=b)=\frac{{{B}\choose{b}} {{N-B}\choose{n-b}}}{N\choose n}$$
