$X$ is the random variable that signifies the number of times a coin is thrown such until the appearance of a second "tail". With the probability of an appearance of "tails" on one toss being $p$. Find this expectation.
I know that
$$P\{X=k\}=\binom{k-1}{1}p^2(1-p)^{k-2}$$
I just do not know how to calculate the expectation for this.
From your expression for $\Pr(X=k)$ we have $$E(X)=\sum_{k=2}^\infty k(k-1)p^2(1-p)^{k-2}.$$ Let $$f(x)=\frac{1}{1-x}=1+x+x^2+x^3+x^4+\cdots.$$ Take second derivatives. We get $$f''(x)=\frac{2}{(1-x)^3}=\sum_{k=2}^\infty k(k-1)x^{k-2}.$$ Let $x=1-p$ and multiply the result by $p^2$.
Remark: If you already know the mean of the geometric distribution, here is a simple way. Let $U$ be the number of tosses until the first tail, and let $V$ be the number of tosses between the first tail and the second. Then $X=U+V$, where $U$ and $V$ have geometric distribution. The mean of each of $U$ and $V$ is $\frac{1}{p}$, so the mean of $X$ is $\frac{2}{p}$.