Why is $|\prod\sum f(p^k)-\sum f (n)|=|\sum_{p_1,\cdots, p_r \leq x} f(p_1^{k_1})\cdots f(p_r^{k_r})-\sum f(n)|$ true?

I was reading chapter $3$ proposition $3.2$ of Marius Overholt where I am stuck at some point where he uses the equation

$$\big|\prod_{p \leq x}\sum_{k=0}^\infty f(p^k)-\sum_{n\leq x}f(n)\big|=\big|\sum_{p_1,\cdots, p_r \leq x} f(p_1^{k_1})\cdots f(p_r^{k_r})-\sum_{n\leq x}f(n)\big|$$

I am not getting why is this true!! If you observe closely, you will get that in the R.H.S there is nothing about the $k_i$'s. If we assume this then everything falls very prominently. I am giving a snapshot of that page as well so that you could have a trace of the problem. If this is wrong then please give an alternate way to approach the proposition which could be found in that snapshot as well.

Call $p_1,\ldots,p_r$ the primes $\le x$. Then \begin{align} \prod_{i=1}^r \sum_{k\ge 0}f(p_i^k)&=\left(1+f(p_1)+f(p_1^2)+\cdots\right)\left(1+f(p_2)+f(p_2^2)+\cdots\right)\cdots \\ &=\sum_{k_1 \ge 0} \cdots \sum_{k_r \ge 0} f(p_1^{k_1}) \cdots f(p_r^{k_r}). \end{align} In particular, just replace that $p_1,\ldots,p_r\le x$ with $k_1,\ldots,k_r \ge 0$.