Problem: A message is transmitted in two steps. Each step requires an independent exponentially distributed random variable with mean $\lambda$. Derive the distribution of the proportion of time spent in the second step.
I'm attempting to answer my own question, hopefully I will land at the right solution.
Please let me know if I'm doing it right....
Let random variable $Y=\frac{Y}{X+Y}$ and $Y=1-X$. (Maybe I should set $Z=\frac{Y}{X+Y}$ ?)
Let$P(Y\le y)$ = $P(1-X\le y)=P(X\ge y-1)$
Derive CDF to be $F_X(x) = 1-e^{-\frac{x}{\lambda}}$
$$ \begin{align} F_Y(y) = P(X\ge y-1) & = 1- P(X\le y-1)\\ & = 1-({1-e^\frac{1-y}{ \lambda }})\\ & = e^\frac{1-y}{ \lambda }\\ \end{align} $$
Since $X \ge 0$ and $Y= 1-X$ then $Y \le 1$ $$ F_Y(y) = \begin{cases} e^\frac{1-y}{ \lambda }, & \text{$Y \le1 $} \\[2ex] 1, & \text{$Y\gt 1$ } \end{cases} $$
$$F_Y'(y) = f_Y(y) = \begin{cases} -\frac{1}{\lambda}e^\frac{1-y}{ \lambda }, & \text{$Y \le1 $} \\[2ex] 1, & \text{$Y \gt 1 $} \end{cases} $$
Yes, $Z= Y/(X+Y)$ is the random variable you want, if $X,Y$ are the times in each step, $Z$ is the proportion of the total time spent in the second step.
Then for $z\in[0;1]$, $\mathsf P(Z\leq z) = \mathsf P(Y\leq z(X+Y))$, since $X,Y$ are certainly non-negative.
Thus were you need to start is:
$$\begin{align}\mathsf P(Z\leq z) ~&=~ \mathsf P(Y\leq zX/(1-z)) \\[1ex] &=~\int_0^\infty\int_0^{xz/(1-z)} f_X(x)f_Y(y)\operatorname d y\operatorname d x\\[1ex] &=~ \int_0^\infty \lambda e^{-\lambda x}(1-e^{-\lambda xz/(1-z)})\operatorname d x\\[1ex] &~~\vdots\end{align}$$
...