I have one queue with two servers $S_1$ and $S_2$. The serving times are modelled $\sim\exp(\mu_1)$ and $\sim\exp(\mu_2)$ respectively.
The first server is free while the second has two clients, $A$ whose service is in progress and $B$ that is waiting. Then another client $X$ arrives.
Now, I need to calculate:
- $P_b$, the probability that customer B is still in the system when $S_1$ finishes to serve $X$.
So, intuitively that's simple: let $T_1$ be the time used by $S_1$ to finish one task, and let $T_2$ the time consumed by $S_2$. Saying that $B$ is still in the system means that:
2$T_2$ > $T_1$
In other words, if I change the variable names in $T_A$ and $T_B$, respectively the time $S_2$ needs to serve $A$ and the time for $B$ what I need is:
$P(T_A + T_B > T_1)$
The problem is that I don't know how to step further. The only thing I know is that the sum of two exponential r.v has a density function equals to $\lambda^2 x \ e^{-\lambda x}$.
First of all, the relation $2T_2 > T_1$ is not what you're after. That would implicitly assume that the waiting times for $A$ and $B$ are exactly the same, while they really are independent samples from the same distribution. Also note that the "memorylessness" of the exponential distribution is important here: when customer $X$ arrives, customer $A$'s service is already in progress for some time, let's call it $t$. If we were dealing with a continuous variable other than the exponential distribution, we'd have to take this information into acccount, however the memorylessness says that
$$ \mathbb{P}(T_A > t+s | T_A > t) = \mathbb{P}(T_A > s), \quad s \geq 0.$$
So, you are correct in saying that the probability we are looking for is $\mathbb{P}(T_A + T_B > T_1)$. Here, $T_A,T_B$ are independent exponential random variables with parameter $\mu_2$, and thus $T_A + T_B$ is exponentially distributed with parameter $2\mu_2$. If $f$ is the density of $T_1$, we can now continue by conditioning (aka law of total probability), using the independence of $T_A +T_B$ and $T_1$:
\begin{align*}\mathbb{P}(T_A + T_B > T_1) &= \int_{0}^{\infty} \mathbb{P}(T_A + T_B > T_1 | T_1 = x)f(x)~dx =\int_{0}^{\infty} \mathbb{P}(T_A + T_B > x)f(x)~dx \\ &=\int_{0}^{\infty} e^{-2\mu_2x}\mu_1 e^{-\mu_1x}~ dx = \mu_1 \int_{0}^{\infty}e^{-(2\mu_2+\mu_1)x}~dx \\ &=\frac{\mu_1}{\mu_1 + 2\mu_2}. \end{align*}