Answer is (C)
Let the expected number of coin flips be $X$. The case analysis goes as follows:
a. If the first flip is a tails, then we have wasted one flip. The probability of this event is $\frac{1}{2}$ and the total number of flips required is $X+1.$
b. If the first flip is a heads and second flip is a tails, then we have wasted two flips. The probability of this event is $\frac{1}{4}$ and the total number of flips required is $X+2.$ as the same scenario as beginning is there even after 2 tosses.
c. If the first flip is a heads and second flip is also heads, then we are done. The probability of this event is $\frac{1}{4}$ and the total number of flips required is $2$.
Adding, the equation that we get is -
$X = \frac{1}{2}(X+1) + \frac{1}{4} (X+2) + \frac{1}{4}2$
Solving, we get $X = 6$.
Thus, the expected number of coin flips for getting two consecutive heads is 6.