I managed to solve this problem the way the book wanted me to do so, but I'm having trouble understanding why the following method won't work.
Toss a coin until we get five consecutive heads. $P(\text{Heads}) = p$. Find the expected number of tosses it takes.
We can solve this problem using the law of total expectation and conditioning on where the first Tails lands, which is exactly what leads to the right answer. I'm wondering if the following approach works as well.
The probability of a single heads is $p$, so the probability that we have five heads is $p^5$. We want the expected number of flips to get five consecutive heads. We model this as a geometric random variable with parameter $p^5$. Therefore, we can simply take the expectation of a geometric random variable with parameter $p^5$ which is $\frac{1}{p^5}$.
However, let's take (by some miracle) $P(\text{Heads}) = p = 1$. Then my approach clearly doesn't work mathematically because expected number of tosses would then just be one. Can someone propose a more logical explanation of why this doesn't work.