Let $$S\sim Exponential(\lambda), T\sim Exponential(\mu), U=min\{S,T\}, V=max\{S,T\}$$ The question doesn't say whether $S$ and $T$ are independent but I'm assuming they are, because I sort of used that when I found the distribution of $U$ and $V$. I found $$U\sim Exponential(\lambda+\mu), f_{V}(v) = \lambda e^{-\lambda v}+\mu e^{-\mu v}+(\lambda+\mu)e^{-(\lambda+\mu)v}$$ I'm asked to find $E[V-U] $ in not the obvious way, but I can use that to check my answer. So I need to find the distribution of $V-U$, and here is the hint.
Compute first $P(V−U > s)$ for $s >0$ either by integrating densities of $S$ and $T$ or by conditioning on the events $S < T$ and $T < S$. From $P(V−U > s)$ deduce the density function $f_{V−U}$ of $V−U$, and then the mean $E(V−U)$ by integrating the density.
I am sort of lost on how to do any of things to find $P(V-U>s)$. Then I'm supposed to use the means of of $U,V$ and $U-V$ to answer the following question:
In a hardware store you must first go to server 1 to get your goods and then go to a server 2 to pay for them. Suppose that the times for the two activities are exponentially distributed with rates $\lambda$ and $\mu$. Compute the average amount of time it take Bob to get his goods and pay if when he comes in there is one customer named Al with server 1 and no one at server 2.
Let $A_i,B_i$ be the amount of time Al and Bob spend at server $i$. I drew a timeline and I don't see how the previous exercise applies. I know this a lot, so thank you for taking the time to look at it.
1) \begin{align} \mathsf{E}[V-U]&=\mathsf{E}[(V-U)1\{T\le S\}]+\mathsf{E}[(V-U)1\{T> S\}] \\&=\mathsf{E}[(S-T)1\{T\le S\}]+\mathsf{E}[(T-S)1\{T> S\}]. \end{align}
2) $$ \mathsf{E}[(S-T)1\{T\le S\}]=\iint_{t\le s}(s-t)\lambda e^{-\lambda s}\mu e^{-\mu t}dt ds=\frac{\mu/\lambda}{\mu+\lambda} $$
and
$$ \mathsf{E}[(T-S)1\{T> S\}]=\ldots=\frac{\lambda/\mu}{\mu+\lambda}. $$
The distribution of $V-U$ can be computed in the same way: just replace $V-U$ with $1\{V-U>x\}$ in the first equation. The result is
$$ \mathsf{P}(V-U>x)=\frac{\lambda e^{-\mu x}+\mu e^{-\lambda x}}{\mu+\lambda}. $$
Then $$ \mathsf{E}[V-U]=\int_0^\infty \mathsf{P}(V-U>x)dx=\frac{\mu/\lambda+\lambda/\mu}{\mu+\lambda}. $$