Let $X_i$, $X_j$ be two independent exponentially distributed random variables with rate parameters $\lambda_i$ and $\lambda_j$. Then we know that
$\min\left\{X_i, X_j \right\}$
is also exponentially distributed, with parameter
$\lambda = \lambda_i + \lambda_j$.
The index of the variable which achieves the minimum is distributed according to the categorical distribution
$\Pr\left(k \mid X_k = \min\{X_i, X_j\}\right) = \frac{\lambda_k}{\lambda_i + \lambda_j}$.
A proof is as follows (Borrowed from Wikipedia https://en.wikipedia.org/wiki/Exponential_distribution)
$ I = \operatorname{argmin}_{ \{i, j\}}\{X_i, X_j\}$
$\begin{align} \text{then } \Pr (I = i) &= \int_{0}^{\infty} \Pr(X_i = x) \Pr(X_{j} > x ) dx \\ &= \int_{0}^{\infty} \lambda_i e^{-\lambda_i x} e^{-\lambda_j x} dx \\ &= \lambda_i \int_{0}^{\infty} e^{-\left(\lambda_i +\lambda_j\right) x} dx \\ &= \frac{\lambda_i}{\lambda_i + \lambda_j}. \end{align}$
My question is suppose now we want the above probability within the interval $[0,T]$ instead of $[0,\infty]$, in other words, what is the probablity that $X_i$ precedes $X_j$ within the $[0,]$. I found a formula stating that this probablity is then $ \Pr (I = i) = \frac{\lambda_j e^{-(\lambda_i +\lambda_j)T} +(-\lambda_i -\lambda_j) e^{-\lambda_j T}+\lambda_i}{\lambda_i + \lambda_j} $, but I could not verify it or prove it.
The joint density of $(X_i, X_j)$ is $f(x_i, x_j) = \lambda_i e^{-\lambda_i x_i} \lambda_j e^{-\lambda_j x_j}$. You just need to integrate this over the region of the $(x_i, x_j)$-plane where $x_i < \min\{x_j, T\}$. If you draw a picture, this region can be broken up into a triangle and an infinite rectangular strip.
$$\int_0^\infty \int_0^{\min\{x_j, T\}} f(x_i, x_j) \, dx_i \, dx_j = \int_0^T \int_0^{x_j} f(x_i, x_j) \, dx_i \, dx_j + \int_T^\infty \int_0^T f(x_i, x_j) \, dx_i \, dx_j.$$
The first integral is $$\int_0^T \lambda_j e^{-\lambda_j x_j} \int_0^{x_j} \lambda_i e^{-\lambda_i x_i} \, dx_i \, dx_j = \int_0^T \lambda_j e^{-\lambda_j x_j} (1 - e^{-\lambda_i x_j}) \, dx_j = 1 - e^{-\lambda_j T} - \frac{\lambda_j}{\lambda_i + \lambda_j} (1-e^{-(\lambda_i + \lambda_j)T}).$$
The second integral is $$\int_T^\infty \lambda_j e^{-\lambda_j x_j} \int_0^T \lambda_i e^{-\lambda_i x_i} \, dx_i \, dx_j =e^{-\lambda_j T}(1 - e^{-\lambda_i T})$$
The sum of these two terms doesn't quite match up with your answer, but it is similar. Maybe one of us made a mistake somewhere.
Update: as pointed out by OP, the first integral gives the answer, which suggests that OP actually wanted to compute $P(X_i < X_j < T)$.