"A machine suffers instantaneous stoppages of two kinds, major and mine, according to independent Poisson processes with rates $\lambda$ and $\mu$ respectively. Let T denote the time at which the first major stoppage occurs, and let N denote the number of minor stoppages which occur before the first major stoppage. Using the fact that T has an exponential distribution with parameter $\lambda$, and the law of total probability, deduce that the distribution of N is Geometric with
$ P(N = n) = \left( \frac{\lambda}{\lambda + \mu} \right) \left(\frac{\mu}{\lambda + \mu} \right)^n $
for $n = 0, 1, 2, ... $"
From the law of total probability, I know that
$P(N = n) = P(N = n | T = t) P(T = t) $ $= \int_0^{\infty} P(N = n) \cdot \lambda e^{- \lambda t}$
(I thought it should've been a summation sign, not sure why it's integral though, could someone explain that?) Using the Poisson formula to work out $P(N = n)$
You get
$ \int_0^{\infty} \frac{e^{-\mu t}(\mu t)^n}{n!} \cdot \lambda \cdot e^{-\lambda t} dt$
Taking out the constants and combining terms gives
$ \frac{\lambda \mu^n}{n!} \int_0^{\infty} e^{-(\lambda + \mu)t} t^n dt $
But I'm stuck how to go on from here. In the answers, they use a substitution and go from this step to
$ \frac{\lambda \mu^n}{n!} \frac{1}{(\lambda + \mu)^{n+1}} \int_0^{\infty} u^n e^{-u} du = \lambda \mu^n \frac{1}{(\lambda + \mu)^{n + 1}} = \frac{\lambda}{\lambda + \mu} \left(\frac{\mu}{\lambda + \mu} \right)^n$
From the exponential, I thought the substitution might've been $u = (\lambda + \mu) t$, which then gives $du = \frac{dt}{\lambda + \mu}$. And we also get $t = \frac{u}{\lambda + \mu}$ but then I get my integral to read
$ \frac{\lambda \mu^n}{n!} \frac{1}{(\lambda + \mu)^2} \int_0^{\infty} u^n e^{-u} du$
Which isn't the same. What am I doing wrong? Also, how would I do the integral?