Probabilities in a Segmented Poisson Poisson Still new to posting questions here so please correct any errors. I am trying to understand the concept below for my exam:
A Poisson process has rate $\lambda$; its arrivals are of type A with probability $p$ and of type B with probability $(1-p)$.
What is the probability that $j$ arrivals of type B arrive before $k$ arrivals of type A?


*

*The first step is to break up the Poisson process into two
independent processes for type A and type B arrivals with rates $p\lambda$ and
$(1-p)\lambda$ respectively. 

*Next, I know the inter-arrival times are independent and exponentially distributed
about these parameters, so I believe this is the same as asking the
probability of having the sum of $j$ $Exp(p\lambda)$ variables be
less than the sum of $k$ $Exp(p\lambda)$ variables


At this point, the algebra is getting very involved and I feel that I am missing some property of exponential variables... That said, is there a way of solving something similar where arrivals are still iid but not exponentially distributed i.e. when you just have the PDF of inter-arrival times for A and the PDF of inter-arrival times for B?

I guess the property you are looking for is
$$X_i \sim \mathcal E (\lambda), \quad i=1,2,\ldots,n \implies \sum_{i=1}^n X_i \sim \Gamma(n, \lambda).$$
The exponential itself is a $\Gamma(1,\lambda)$.
For a general case the PDF of the sum of i.i.d. r.v. can be calculated by the successive convolution of $n$ PDFs, but usually it is a tedious process. You can also try to find the characteristic or moment generator function of the sum and try to identify a well known distribution (this works for exponentials and Gamma), but it won't make anything easier in the general case.
