# negative binomial distribution problem

Find the probability that you find 2 defective tires before 4 good ones. There is a chance of a tire being defective at a rate of 5%.

From my understanding with the negative binomial distribution we want to repeat the trial until (including) r successes are achieved. Each trial until we have achieved r successes can be composed of either a failure or up to r-1 successes.

P(X=?)=((4+2 - 1) choose (2))*(.95)^4 * (.05)^2

"There are (exactly) 2 defective tires before the 4th good one" is the same thing as "of the first 5 tires, 2 are defective and 3 are good, and then the 6th tire is good". The $5 \choose 2$ is because any 2 of those 5 tires could be the defective ones.
Your approach is correct (and the book's answer is wrong). Let $p$ denote the probability that a tire is defective. The probability to find $2$ defective tires before $4$ good ones is $$s=p^2+2p^2(1-p)+3p^2(1-p)^2+4p^2(1-p)^3.$$ Plugging $p=\frac1{20}$ into this yields $s=0.0225925$, that is, approximately $2.26\%$.