My answer is not the same as the solution,but i didn't find any problem from my calculation
My calculation:
$H(x)=-\sum_{k=1} ^ {\infty} p(1-p)^{k-1}\log_2 (p(1-p)^{k-1}) $
$ = -\sum_{k=1} ^ {\infty} \frac{p}{(1-p)}(1-p)^k\log_2 (p(1-p)^{k-1}) ...(1)$
$ = \frac{-p}{(1-p)}\sum_{k=1} ^ {\infty} (1-p)^k\log_2 (p(1-p)^{k-1})...(2)$
$ = \frac{-p}{(1-p)} \frac{(1-p) \log_2 p}{1-(1-p)\log_2(1-p)}...(3) $
$ =\frac{-p\log_2 p}{1-(1-p)log_2 (1-p)} $
And the solution from the book is
$H(x)=-\sum_{k=1} ^ {\infty} p(1-p)^{k-1}\log_2 (p(1-p)^{k-1})$
$ = -p\log_2(p)\sum_{k=1} ^ {\infty}(1-p)^{k-1}-p\log_2(1-p)\sum_{k=1} ^ {\infty}(k-1)(1-p)^{k-1}$
$= -p\log_2(p)\frac{1}{1-(1-p)}-p\log_2(1-p)\frac{1-p}{(1-(1-p))^2}$
$= -\log_2(p)-\frac{1-p}{p}\log_2(1-p)$
Actually,i don't understand the solution,so i calculate the problem by my own method,but i find my answer is not the same as the solution,can anyone tell me where am i wrong or maybe the answer is wrong?
As discussed in the comments, the mistake in your computation is the step from (2) to (3). Rewriting your (2) slightly (using $q$ as shorthand for $1-p$ and $\log$ for $\log_2$) your (2) says $$H(x)=-\frac p q \sum_{k\ge1}q^{k-1}\log(pq^{k-1})$$ which (writing $n=k-1$) is the same as $$H(x)=-p\sum _{n\ge0}q^n(\log p + n\log q)=-p \left( \log p \sum_{n\ge0} q^n + \log q \sum_{n\ge0} n q^n\right)$$ $$ = -p\left( \log p \frac 1 {1-q} + q\log q\sum_{n\ge1} n q^{n-1}\right)$$ $$ = -p\left( \log p \frac 1 {1-q} + \frac {q\log q}{(1-q)^2}\right)$$ $$ = -p\log p -\frac {q\log q}p,$$ which agrees with your book's answer and the Wikipedia article. The sum $\sum_{n\ge 1} nx^{n-1} = 1/(1-x)^2$, which is not itself a geometric series, can be obtained by differentiating the geometric series.
Your (3) apparently is based on the false assumption that $\log ((1-q)^{k-1}) = (\log(1-p))^{k-1}$.