Clarification on expected number of coin tosses for specific outcomes. As seen in this question, André Nicolas provides a solution for 5 heads in a row.
Basically, for any sort of problem that relies on determining this sort of probability, if the chance of each event is 50/50, then no matter what the composition of values, the linear equation would be the same?
For example, in the case of flipping 5 coins, and wanting to find out how many flips are needed for 4 consecutive tails followed by a head, is the same form as trying to find how many flips for 5 heads? 
specifically:
$$x=\frac{1}{2}(x+1)+\frac{1}{4}(x+2)+\frac{1}{8}(x+3)+\frac{1}{16}(x+4)+\frac{1}{32}(x+5)+\frac{1}{32}(5).$$
Where $\frac{1}{32}(x+5)$ denotes the last flips chance of landing a tails after 4 heads in a row (.5*.5*.5*.5*(P(tails))
If I was using an unfair coin in the same example as above (HHHHT) with a 60% chance to land on heads, would the equation be:
$$x=\frac{1}{2}(x+1)+\frac{1}{4}(x+2)+\frac{1}{8}(x+3)+\frac{1}{16}(x+4)+\frac{1}{40}(x+5)+\frac{1}{40}(5).$$

No, it is not the same.  For this pattern, the argument holds well (if you keep flipping heads) until four tosses.  But on the fifth toss, if you flip heads you are done, but if you flip tails you are not back to the start-you have potentially flipped the first of your winning series.  You will need to consider states where you have flipped some number of tails so far.
For the unfair coin problem, aside from that objection, the $\frac 12$ would become $\frac 25$ for the first one because you have a $40\%$ chance to land tails and be back at start.  Again, the first four flips work fine (with $0.4^n$) but you need to worry about states with one or more heads in the bank.
