The principle of analytic continuation is reliant on the identity theorem.
Suppose that $f,g$ are analytic on $\Omega$, a connected open set, and the set of points where $f = g$ has a limit point. Then, $f=g$ on $\Omega$.
Now, the question is this : we have the functions $F(x) = \frac{1}{\prod (1+x^k)}$ and the power series $G(x) = \sum_{k=0}^\infty p(k)x^k$. These are functions , for now defined on $[0,1)$, which agree on $[0,1)$.
Now, analytic continuation is basically this : suppose we find a holomorphic function $F_1$ on the unit disk which extends $F$, and a holomorphic function on the unit disk $G_1$ which extends $G$. Since $F=G$ on $[0,1)$, $F_1 = G_1$ on $[0,1)$, which contains the limit point $0$, and therefore by the identity theorem, $F_1=G_1$ on the entire unit disk.
But what are $F_1$ and $G_1$? The answer to this is fairly obvious : the expressions which define $F$ and $G$ also end up making sense on the entire unit disk.
That is, for $\{|z|<1\}$ define $F_1(z) = \frac 1{\prod (1+z^k)}$. Does this make sense? Indeed it does, for the exact same reason it did for $x$. We have the following theorem for infinite products.
Suppose that $a_n \neq -1$ is a sequence of complex numbers with $\sum_{n=1}^\infty |a_n| < \infty$. Then the infinite product $\prod_{n=1}^\infty (1+a_n)$ converges absolutely to a non-zero quantity.
With this in mind, the obvious check on $\prod_{k=1}^\infty{(1+z^k)}$ shows that $F_1$ exists on $\{|z|<1\}$. This extends $F$, obviously.
Now, for $G_1$ take the power series defining $G$ i.e. define $G_1(z) = \sum_{k=0}^{\infty} p(k)z^k$. A theorem concerning power series easily shows that $G_1$ is defined on $|z| < 1$ :
Suppose that $\sum a_kz^k$ is a power series centered around zero, and suppose that $\sum a_kr^k < \infty$ for some $r>0$. Then , for every $|z|<r$, we have $\sum a_kz^k < \infty$.
That is, finding one number for which a power series converges, gives a lot of other numbers for which that power series converges.
Now, $G_1$ is easily defined on $|z|< 1$ : for any $|z|<1$, we know that $G_1(\frac{1+|z|}{2}) = G(\frac{1+|z|}{2}) < \infty$, so $G_1(z) < \infty$.
Thus, $G_1$ and $F_1$ are well defined, so by the usual theorem they agree on the unit disk. This is what is meant by "analytic continuation" of the identity $ F(x)= \sum_{k=0}^\infty p(k)x^k$.
Part $2$ is exactly the same. The side $\prod(1-x^m)$ extends by the result for infinite products on $|z|<1$, and the power series extends by the theorem for power series. Thus, the same argument yields equality on $|z|<1$.