Problem: This is problem 33 of section 2.6 (conditioning) in Bertsekas, Tsitsiklis Introduction to Probability 2nd:
We are given that a coin has probability of heads equal to p and tails equal to q and it is tossed successively and independently until a head comes twice in a row or a tail comes twice in a row. What is the expected value of the number of tosses?
I don't understand the answer. Why $$E[X\mid H1,T2] = 1+E[X\mid T1]$$ Is there any relationship?


The equation $$E[X\mid H_1,T_2]=1+E[X\mid T_1]$$ reads as follows:
The $1+$ in the RHS stands for the first toss that missed to bring a result (the first was Heads and the second Tails, so the first toss in know irrelevant, it is a failure. But keep the Tails in the second toss, you might toss again Tails in the third so this is not yet a failure).
So, to make it clearer: In the first toss you tossed a Head and in the second Tails. Where are you standing now, just before the third toss? You have tossed Tails and you are starting over. So, the Heads in the first toss are irrelevant now and the only thing that matters is the Tails that you tossed in the second toss. Name this toss $1$ and start over. Do you see it now?