Start by introducing some notation:

Let Y be the random variable 'number of good items in a batch'. Then Y ~ Binomial(n, p).

Pr(batch rejected) .

Let X be the random variable 'number of batches rejected'. Then X ~ Binomial .

Now construct the likelihood function etc.