Am assuming a machine needs 2 types of parts to work which are type A and type B. The machine has one part of each type to begin, and there are also 2 spare A parts and 1 spare B part. I assume that, when a part fails, it is replaced by a spare part of the same type, if available, instantaneously. I'm supposing that the lifetimes (time in service) of all parts are independent whereby parts of type A are Exp(λ) distributed while parts of B are Exp(μ)
distributed.
I now want to determine the expected time until the machine fails for lack of needed parts.
In my opinion, I will proceed as follows:
Let the event that machine fails because of lack of part A be X while Y because it fails because of lack of part B Thus, I need to compute E(X+Y) = $E(X)$ + $E(Y)$. Since $X$ and $Y$ follow the exponential distribution with mean $1/λ$ and $1/μ$ respectively, we compute $2(1/λ)$ + (1/μ).
Is this correct?
Let $A_t$ denote the number of defective part A's at time $t$ and $B_t$ denote the number of defective part B's at time $t$. Set $T_A^3=\inf\{t:A_t=3\}$ and $T_B^2=\inf\{t:B_t=2\}$. We are interested in $E(\min\{T_A^3,T_B^2\})$. Fortunately the distributions of $T_A^3$ and $T_B^2$ are known explicitly since $A_t$ and $B_t$ can be regarded as independent Poisson processes with rates $\lambda$ and $\mu$ respectively.
Note that
$ \begin{align*} P(T_A^3\leq t)&=P(A_t\geq3) \\ &=\sum_{n=3}^{\infty}\frac{(\lambda t)^n}{n!}e^{-\lambda t} \end{align*} $
Similarly $P(T_B^2\leq t)=\sum_{m=2}^{\infty}\frac{(\mu t)^m}{m!}e^{-\mu t}$.
By independence we get $P(\min\{T_A^3,T_B^2\}>t)=P(T_A^3>t)P(T_B^2>t)$. Hence
$ \begin{align*} E(\min\{T_A^3,T_B^2\})&=\int_0^{\infty}P(\min\{T_A^3,T_B^2\}>t)\,dt \\ &=\int_0^{\infty}(1-\sum_{n=3}^{\infty}\frac{(\lambda t)^n}{n!}e^{-\lambda t})(1-\sum_{m=2}^{\infty}\frac{(\mu t)^m}{m!}e^{-\mu t})\,dt \\ &=\int_0^{\infty}(1+\lambda t+\frac{(\lambda t)^2}{2})(1+\mu t)e^{-(\lambda+\mu)t}\,dt \\ &=\int_0^{\infty}(1+(\lambda+\mu)t+(\lambda\mu+\frac{\lambda^2}{2})t^2+\frac{\lambda^2\mu}{2}t^3)e^{-(\lambda+\mu)t}\,dt \\ &=\frac{2}{\lambda+\mu}+\frac{\lambda(\lambda+2\mu)}{(\lambda+\mu)^3}+\frac{3\lambda^2\mu}{(\lambda+\mu)^4}. \end{align*} $