Renewal process past exam question Consider a renewal process ($N_t$, t ≥ 0) with independent inter-occurrence times $X_n$, n ∈ N, all having the same cumulative distribution function:
$P(X_1 ≤ x) = w_1*F_1(x) + w_2*F_2(x)$, $w_1, w_2 ∈ (0, 1), w_1 + w_2 = 1$,
Where 
$F_i(x) = 0 $ if x<0 
$= 1 − e^{−λ_ix} $ if $x>=0$
A) compute Compute $m = E(X_1)$ as a function of $λ_i, w_i$, $i=1,2$
B) What should be the distribution function of ‘the time (from time 0) until the first occurrence’ $X_0$, so that the renewal process is stationary?
For part A i tried to find the probability density function $P(X_1=x_1)$ (1) and the probability density function $f_i(x)$ (2), then after substituting (2) into (1), integrate between 0 and t.
For B however I'am not sure on what to do. 
Any help will be appreciated.
 A: For $x>0$, we have $F(x)=\mathbb P(X_1\leqslant x)=w_1(1-e^{-\lambda_1 x}) + w_2(1-e^{-\lambda_2 x})$. Differentiating yields that $X_1$ has density $$f(x) = w_1\lambda_1e^{-\lambda_1 x} + w_2\lambda_2e^{-\lambda_2 x}, $$
so we see that $X=w_1Y_1+w_2Y_2$ where $Y_i\sim\operatorname{Exp}(\lambda_i)$. By linearity of expectation it follows that
$$\mathbb E[X] = w_1\mathbb E[Y_1] + w_2\mathbb E[Y_2] = \frac{w_1}{\lambda_1}+\frac{w_2}{\lambda_2}. $$
Let $\{S_n\}$ be the renewal times, and let $\{X_n\}$ be an iid sequence of random variables with
$$\mathbb P(X_1 = 1 ) = w_1 = 1 - \mathbb P(X_1=2). $$
for $n\geqslant 0$. We can interpret $X_n$ as which distribution $S_n$ came from, in which case $\{S_n\}$ and $\{X_n\}$ are either both stationary or neither is. For $\{X_n:n\geqslant 0\}$ to be a stationary process, it must satisfy its own stationary distribution (which is that of $X_1$).
(I will fill in this detail later)
Now, $\{S_n:n\geqslant 0\}$ is stationary iff the distribution of $S_0$ is that of its forward recurrence time, i.e.
$$\mathbb P(S_0\leqslant t):=G(t) = \frac1\mu\int_0^t(1-F(s))\mathsf d s, $$
where $\mu=\mathbb E[X_1]$ and $F$ is the distribution function of $X_1$. Now, since $w_1+w_2=1$, we have
\begin{align}
\int_0^t G(s)\mathsf d s &= \int_0^1 \left(1 - (w_1+w_2) + e^{-\lambda_1 s}+e^{-\lambda_2 s}\right)\mathsf d s\\
&= \int_0^t e^{-\lambda_1 s}\mathsf d t \int_0^t e^{-\lambda_2 s}\mathsf d t \\
&= \frac{w_1}{\lambda_1}(1-e^{-\lambda_1t})+\frac{w_2}{\lambda_2}(1-e^{-\lambda_2t}).\end{align}
Multiplying by $\frac1\mu=\frac{\lambda_1\lambda_2}{w_1\lambda_2+w_2\lambda_2}$ yields
$$G(t) = \frac{w_1\lambda_2}{w_1\lambda_2 + w_2\lambda_1}\left(1-e^{-\lambda_1 t}\right)+\frac{w_2\lambda_1}{w_2\lambda_1 + w_1\lambda_2}\left(1-e^{-\lambda_2 t}\right). $$
Therefore
$$S_0\sim \frac{w_1\lambda_2}{w_1\lambda_2 + w_2\lambda_1}\operatorname{Exp}(\lambda_1)+\frac{w_2\lambda_1}{w_2\lambda_1 + w_1\lambda_2}\operatorname{Exp}(\lambda_2). $$
