What is the expected number of coin flips to get THH Hi I am having some trouble verifying that the number of flips to get THH is 8, for a fair coin by my thought processes.
My current thought processes is as follows
1/2(x+1)+(1/2)(1/2)(x+1)+(1/2)(1/2)(1/2)(x+2)+(1/2)(1/2)(1/2)8 = x
The thought processes is if we get Heads we add one more toss to our expectation
If we get Tails Tails we only add one more toss since it just repeats our initial state - we’ve only wasted one Tails
If we get Tails Heads Tails - we’ve wasted two tosses prior before repeating our initial state
Finally if we toss Tails Heads Heads we get 3 total tosses.
Somewhere my logic with enumerating the tosses is incorrect, but I am having some trouble it, any help will be thankful.
 A: Let us define the states on useful points reached:
$S =$ starting toss, $\;A1≡ T, \;A2≡ TH, \;A3\equiv THH$
Then tracing movement step-by-step from one state to another, we have
$S=1+.5A1+.5S$
$A1=1+.5A2+.5A1$
$A2=1+.5A1\quad$ [Either we have got $THH$ and are done, or go back to $A1$]
Solving these equations,
tosses needed from start, $S= 8$

ADDED MATERIAL TO ADDRESS OP's COMMENT
I had looked at only the first answer to the similar question, which requires greater Math knowledge, but on closer examination I find that the second answer uses  virtually the same process as I have followed, and since OP has asked whether OP's approach can be made to work somehow, I am adding some material to that effect.

*

*Trivially, we know that the expected # of tosses to get a $T=2$, but note that once there, we can't go back, so the problem simplifies to getting two consecutive heads from T.

*We also know, that it takes $2$ more tosses to get the first $H$, so the equation from here in the way OP wants is $x=2+(1/2)⋅1+(1/2)⋅(x+1)$

*Solving, $x=6,$ and adding the first $2$ to get to $T$, ans $=2+6=8$
