I now have two random sums $S_{N_1}\equiv\sum_{i=1}^{N_1}X_i$ and $S_{N_2}\equiv\sum_{i=1}^{N_2}Y_j$ where $N_1$ is dependent on $X_i$'s and $N_2$ on $Y_j$'s. In particular, $X_i$'s and $Y_j$'s are i.i.d. exponential random variable given the corresponding states (from a continuous time Markov) are known. And, yes, $X_i$'s and $Y_j$'s are inter-arrival times from two independent Markov-modulated Poisson processes.

I want to know the probability that $$ \mathbb{P}\{S_{N_1} < S_{N_2}\} $$ What am I supposed to begin with?

A rough idea now I am having goes as follows. I first condition on $N_1$ and $N_2$ to get $$ \mathbb{P}\{S_{N_1} < S_{N_2}\} = \sum_{N_1, N_2}\mathbb{P}\{S_{n_1} < S_{n_2}\}\mathbb{P}\{N_1\}\mathbb{P}\{N_2\} $$ then, since $S_{n_1}$ and $S_{n_2}$ will be some distributions (not gamma since the rates in $X_i$'s or $Y_j$'s are distinct) given the CTMC states, I condition again on the states $$ \mathbb{P}\{S_{N_1} < S_{N_2}\} = \sum_{N_1, N_2}\sum_{\mathcal{S}_{1},\mathcal{S}_{2}}\mathbb{P}\{S_{n_1} < S_{n_2}\}K\mathbb{P}_{N_1}\mathbb{P}_{N_2} $$ where $K$ is some term resulting from the conditioning on the CTMC states. Up here, I have no idea how to proceed with the $\mathbb{P}\{S_{n_1} < S_{n_2}\}$ with $S_{n_1}$ and $S_{n_2}$ are sums of exponentials with distinct rates.

Any thoughts will be greatly appreciated