Problem 5.4i in Shreve examines a symmetric random walk. Let $\tau_2 $ be the first time that the random walk reaches 2.
For $\alpha\in (0, 1) $, we are given that $$E [\alpha ^ {\tau_2}] =\sum_{k = 1} ^\infty (\alpha/2) ^ {2k}\frac{(2k)!}{(k+1)!k!}$$
It's clear that
$$E [\alpha ^ {\tau_2}] =\sum_{k = 1} ^\infty (\alpha) ^ {2k} P (\tau_2 = 2k) $$
It's therefore tempting to conclude that
$$P (\tau_2 = 2k)=\frac{(2k)!}{(k+1)!k!}2^{-2k}$$
And indeed that is the answer given. But in general $\sum_i f_i g_i =\sum_i f_i h_i$ does not imply that $g_i = h_i$ and so I'm not sure how we can reach this conclusion. (Asked about specific circumstances where this conclusion is true here.) What am I missing?