# Two independent Poisson processes.

I am trying to prove the result that exactly $k$ occurrences of a Poisson process before the first occurrence of another independent Poisson process is a geometric random variable.

\begin{align} & P(k\text{ events of type }\lambda_1 \text{before first event of type } \lambda_2) P(\text{the next event is of type }\lambda_2) \\[6pt] = {} &\left( \int_0^\infty e^{-\lambda_1t}\frac{(\lambda_1t)^k}{k!}e^{-\lambda_2t}dt\right) (\frac{\lambda_2}{\lambda_1+\lambda_2}) \\[6pt] = {} & \frac{\lambda_1^{k}\lambda_2}{k!(\lambda_1+\lambda_2)} \int_0^\infty t^ke^{-(\lambda_1+\lambda_2)t} \, dt \\[6pt] = {} & \frac{\lambda_1^{k}\lambda_2}{k!(\lambda_1+\lambda_2)} . \frac{\Gamma(k+1)}{(\lambda_1+\lambda_2)^{k+1}} \\[6pt] = {} & \frac{\lambda_1^{k}\lambda_2}{(\lambda_1+\lambda_2)^{k+2}} \end{align}

I cannot figure out why I am having an extra $(\lambda_1+\lambda_2)$ term in the denominator. Can someone please point out where I am going wrong?

Thanks!

Let $N_i$ be a Poisson process of rate $\lambda_i$ and $X_i$ the distribution of its interarrival times, i.e., exponential distribution with mean $1/\lambda_i$. Let $f_{X_i}$ be the density function of $X_i$. Then, we want to know the probability that during time of $X_2$, exactly $k$ occurrences of type-1 have happened. This means that when the first type-2 occurrence happens, exactly $k$ of type-1 did happen. Thus,