Let $\mu_{n}$ denote the expectation of the number of times a coin
is thrown until the appearance of an $n$-th tail.
Then you are looking for $\mu_{2}$.
Let $E$ denote the event that the first throw is a tail.
Then $\mu_0=0$ and $\mu_{n}=\left(1+\mu_{n-1}\right)P\left(E\right)+\left(1+\mu_{n}\right)P\left(E^{c}\right)$ for $n>0$, so that:
$\mu_{1}=1P\left(E\right)+\left(1+\mu_{1}\right)P\left(E^{c}\right)=1+\mu_{1}\left(1-p\right)$
implying that $\mu_{1}=\frac{1}{p}$.
and:
$\mu_{2}=\left(1+\mu_{1}\right)P\left(E\right)+\left(1+\mu_{2}\right)P\left(E^{c}\right)=\left(1+\frac{1}{p}\right)p+\left(1+\mu_{2}\right)\left(1-p\right)$
implying that $\mu_{2}=\frac{2}{p}$.
With induction it can be shown that $\mu_n=\frac{n}{p}$.