In comments above, Tim asked why it must be that if $X\sim\mathrm{Poisson}(\lambda)$ and $Y\sim\mathrm{Poisson}(\mu)$ and $X$ and $Y$ are independent, then we must have $X+Y\sim\mathrm{Poisson}(\lambda+\mu)$.
Here's one way to show that.
\begin{align}
& \Pr(X+Y= w) \\[8pt]
= {} & \Pr\Big( (X=0\ \& \ Y=w)\text{ or }(X=1\ \&\ Y=w-1) \\
& {}\qquad\qquad\text{ or } (X=2\ \&\ Y=w-2)\text{ or } \ldots \text{ or }(X=0\ \&\ Y=w)\Big) \\[8pt]
= {} & \sum_{u=0}^w \Pr(X=u)\Pr(Y=w-u)\qquad(\text{independence was used here}) \\[8pt]
= {} & \sum_{u=0}^w \frac{\lambda^u e^{-\lambda}}{u!} \cdot \frac{\mu^{w-u} e^{-\mu}}{(w-u)!} \\[8pt]
= {} & e^{-(\lambda+\mu)} \sum_{u=0}^w \frac{1}{u!(w-u)!} \mu^u\lambda^{w-u} \\[8pt]
= {} & \frac{e^{-(\lambda+\mu)}}{w!} \sum_{u=0}^w \frac{w!}{u!(w-u)!} \mu^u\lambda^{w-u} \\[8pt]
= {} & \frac{e^{-(\lambda+\mu)}}{w!} (\lambda+\mu)^w
\end{align}
and that is what was to be shown.
The first reply will give you the correct answer, but if you need to use the negative binomial function to generate the pmf...
The equation for the negative binomial is:
$$nb(x;r,p)= {x+r-1\choose r-1} p^r (1-p)^x$$ where r = number of successes, p = P(S), and x = the number of failures prior to the rth success. That last part is important to understand in order to solve the rest of the problem. For this problem, p = .5, and r = 3 as the 3rd child of the same gender is where the parents will stop. This gives us: $$nb(x;3,\frac{1}{2})= {x+2\choose 2} \frac{1}{8} (\frac{1}{2})^x$$ (Trust me, using fractions will make this easier to calculate by hand.) If unfamiliar, the large parenthetical indicates a combination process and should be read as "$x+r-1$ choose $r-1$" or in plain English, "out of $x+r-1$ items, how many ways can I select $r-1$ items." You would calculate it for this problem, using this equation: $$\frac{(x+2)!}{2!((x+2)-2)!}$$
First thing to note is that you can achieve success by having either 3 girls or 3 boys. "Either" and "or" indicates a union of two sets, which would also mean the addition of probabilities. Since P(G) = P(B), then whatever probabilities you get for a given x value, you can simply double it in order to show the probability for both cases, 3 boys/3 girls, as the negative binomial equation will not change.
Second thing to note is that $0 \le X < 3$ because there are only two options. 3 failures before the 3rd success then implies that 3 children of the opposite gender were born. Since this would mean success, it is logically impossible for them to have 3 failures before the 3rd success. Thus, X can't be equal to or greater than 3.
From here, it's quite easy. Use the possible x values in X's domain and double your result to get the correct p(x) needed to create a pmf.
I know this seems like overkill, but given how the question was asked, this would be the way to solve it while using the negative binomial.
Best Answer
It should be $P(X = k) = \dbinom{n}{k} p^k(1-p)^{n-k}$ and hence $P(X \leq k) = \sum_{r=0}^k\dbinom{n}{r} p^r(1-p)^{n-r}$.