Please find the probability Let X and Y be exponential random variables with parameters 1 and
2 respectively. Another random variable Z is defined as follows.
A coin, with probability p of Heads (and probability 1 − p of Tails) is
tossed. Define Z by
Z =  X if the coin turns Heads
  =  Y if the coin turns Tails
Find P(1<=Z<=2).

Hint: The answer will be $pa+(1-p)b$, where $a$ is the probability that an exponential with mean $1$ lies between $1$ and $2$, and $b$ is the probability that an exponential with mean $2$ lies between $1$ and $2$. 
The calculation of $a$ and $b$ can be done by integration, or by recalling the formula for the cumulative distribution function of the exponential with parameter $\lambda$.
