Expected value for a Poisson Process A machine works for an exponentially distributed time with rate μ and then fails. A repair crew checks the machine at times distributed according to a Poisson process with rate λ; if the machine is found to have failed then it is immediately replaced. Find the expected time between replacements of machines.

What I have so far: 
I believe that if M represents the failure time of the machine and T represents the time when the machine is checked, then the probability of the machine being replaced is:
P(M < T) = μ/(μ+λ)
Since both M and T are exponentially distributed. So, that got me into thinking that this as Exponential(μ+λ) distributed, and so the expected time for the machine to be fixed is just (μ+λ)/μ.
Another thought was to find the expected time of the failure of the machine (1/μ) and then the expected time of checking the machine conditioned on the machine having failed, which I think is just 1/λ by the no memory property.
However, I feel like I do not understand what I am doing and am just aimlessly trying to solve the question. I can't seem to find a similar problem or example in my textbook (I'm on Ch 5 of "Introduction to Probability Models" by Ross, 10ed), and if anyone can help me with the problem or refer me to some good resources, I would be extremely grateful.
Thank you!
Quick edit:
It looks like the question asks for the expected time between replacements, so now I feel like I did things completely wrong :(
 A: The time $T$ between two successive replacements is the sum of the lifetime $D$ of the machine and the elapsed time $R$ between the moment when it fails and the moment when it is replaced. By hypothesis $D$ is exponential with parameter $\mu$ and $R$ is exponential with parameter $\lambda$. Hence $E(T)=E(D)+E(R)=1/\mu+1/\lambda$, as suggested in one paragraph of your post.
Note that the random variable $T$ is never exponentially distributed. Rather, when $\lambda\ne\mu$, its probability density function $f_T$ is defined on $t\ge0$ by
$\displaystyle f_T(t)=\frac{\lambda\mu}{\lambda-\mu}(\mathrm{e}^{-\mu t}-\mathrm{e}^{-\lambda t})$ and, in the degenerate case $\lambda=\mu$,
$f_T(t)=\lambda^2t\mathrm{e}^{-\lambda t}.$
A: I was trying to understand this problem myself but couldnt find an easy to understand answer until I solved a similar problem.
Basically, this problem is analogous to the classic single server problem. In this case, we have server service time $M\sim \exp(\mu)$ (that is equivalent to the machine failure time) and customers arrival following a Poisson process with rate $\lambda$. In this case, the customers that arrive and find the server occupied will leave immediately. Therefore the machine failure can be regarded as an occupied server and checks as the arriving customers. Given this representation, the solution is straightforward. Let $T$ be the time the server is occupied by successive customers (time between replacement of machines) and $C$ be the time between customer arrivals (time between checks by the repair crew), we then have
\begin{aligned}
E[T] &= E[T|C>M]P(C>M) + E[T|C<M]P(C<M)\\
&= E[C]P(C>M) + E[T+C]P(C<M)\\
&= E[C]\frac{1}{P(C>M)} \\
&= \frac{1}{\lambda}\frac{\lambda+\mu}{\mu} \\
&= \frac{1}{\mu} + \frac{1}{\lambda}.
\end{aligned}
Where $E[T|C<M]=E[T+C]$ because we take into account the time the check was made and the time between replacement of the machine again due to the restarting of the process resulting from the memoryless property of exponential random variables.
A: The time in between replacements of machines will be exponentially distributed. 
