We can solve this using the method of recursion. We have three cases to consider. First, we throw two $H$s on our first two throws, giving us a result of 2. Second, our first throw is a $T$. In this case, we must add one to our expectation. Third, we throw $HT$. In this case, we must add two to our expectation. So, our equation is
$$
\text{E}[HH] = 2 P(HH) + P(T) \left( \text{E}[HH] + 1 \right) + P(HT) \left( \text{E}[HH] + 2 \right).
$$
It is straightforward to see that
$$
P(T) = \frac{1}{2}
$$
$$
P(HH) = \frac{1}{4}
$$
$$
P(HT) = \frac{1}{4}
$$
and solving the above equation gives
$$
\frac{1}{4} \text{E}[HH] = 1.5
$$
$$
\text{E}[HH] = 6.
$$