Cars pass a certain street location according to a Poisson Process with rate $\lambda$. An old lady and her trusty boyscout want to cross the street at this location. They wait until they can ensure no cars will pass in the next T time units. Find their expected wait time.
I'm approaching this via the double expectation formula, but I'm getting stuck towards the end of the problem.
Let $W$ = a random variable representing the expected wait time
Let $X$ = a random variable representing the time until the first car passes.
Then, I can say: $$ E[W] = E[E[W|X=x]] $$
Where $$E[W|X=x] = \begin{cases} 0, & \text{if }x\geq T \\ x + E[W], & \text{if } x < T \end{cases}$$ So Then $$E[E[W|X=x]] = \int_0^\infty E[W|X=x] * \lambda e^{-\lambda x}dx$$ $$ = \int_0^T E[W|X=x] * \lambda e^{-\lambda x} + \int_T^\infty E[W|X=x] * \lambda e^{-\lambda x}$$
According to how I defined $E[W|X=x]$, the second integral should drop out because $E[W|X=x] = 0 $ for $X \geq T, correct? $
So what I'm left with is the following:
$$E[W] = \int_0^T (x + E[W]) * \lambda e^{-\lambda x} $$
Now I'm not exactly sure how to reduce this further as it is recursive. Also, I saw another solution which does not drop out the second integral as I have, but evaluated it instead, which I found somewhat odd. I'd appreciate any explanation about how to proceed further.
Again, to clarify, I am interested in how to handle the recursive nature of this integral. Not to mention, I did not find the explanation on the "duplicate" to be very straightforward and I would like further clarification. Hence this question is different from the said duplicate and I would appreciate that it be reopened.