Prove that $\sum_{k=0}^{n} \binom{n+k}{k} \frac{1}{2^k} = 2^n$
Well, the solution given on the book is as follows:
We will solve this counting problem by a powerful and elegant interpretation of the result. First we divide the identity by $2^n$, getting $$ \sum_{k=0}^{n} \binom{n+k}{k} \frac{1}{2^{n+k}} = \sum_{k=0}^{n} p_k = 1. $$ This is the sum of probabilities $p_k = \binom{n+k}{k} \frac{1}{2^{n+k}}$. Now, $$ p_k = \frac{1}{2}\binom{n+k}{k} \frac{1}{2^{n+k}} + \frac{1}{2}\binom{n+k}{k} \frac{1}{2^{n+k}} = \mathbb{P}(A_k) + \mathbb{P}(B_k),$$ with the events \begin{align*} A_k &= \{\text{$(n+1)$ times head and $k$ times tail}\}, \\ B_k &= \{\text{$(n+1)$ times tail and $k$ times head}\}. \end{align*}
However, I am not getting the way to calculate the probabilities of $A_k$ and $B_k$. I mean, how did we arrive at the conclusion that $\mathbb{P}(A_k) = \frac{1}{2}\binom{n+k}{k} \frac{1}{2^{n+k}}$ and $\mathbb{P}(B_k) = \frac{1}{2}\binom{n+k}{k} \frac{1}{2^{n+k}}$. I mean, how to calculate those probabilities?

I'm not sure why splitting this into two events is necessary. One can say $p_k = P(A_k)$ where $A_k$ is the event of flipping a fair coin $n+k$ times and getting exactly $k$ tails. Then if we imagine a sequence of $H$s and $T$s as the outcomes of the flips then we want $k$ spots of the $n+k$ spots as $T$. This occurs in $\binom{n+k}{k}$ ways. And each outcome has probability $1/2$ so $p_k = \binom{n+k}{k}(1/2^{n+k})$.
This also tells us that the $A_k$ and $B_k$ defined in the solution have probability $\binom{n+k+1}{k}(1/2^{n+k+1})$ which is off by a factor of $n+k+1$ from what we need.