Fred’s beloved computer will last an $Expo(λ)$ amount of time until it has a malfunction. When that happens, Fred will try to get it fixed. With probability $p$, he will be able to get it fixed. If he is able to get it fixed, the computer is good as new again and will last an additional, independent $Expo(λ)$ amount of time until the next malfunction (when again he is able to get it fixed with probability p, and so on). If after any malfunction Fred is unable to get it fixed, he will buy a new computer. Find the expected amount of time until Fred buys a new computer. (Assume that the time spent on computer diagnosis, repair, and shopping is negligible.)
$T$~$Expo(λ)$; Let $X$ be the time untill he buys a new computer:
$E[X]=E[X|I_p=1]p+E[X|I_p=0]q$, where the first term in the right by meaning says that with prob. $p$ computer on average lasted $E[T]$ time untill it get broken +$E[X]$ after being repaired till the moment of being replaced.
But this logic is wrong. Can you give me a hint?