Can someone please explain the 6th line of the explanation: "Also the coefficient of $x^r$ in the product is the number of ways of taking $r$ of the letters $a, b, c,\dots$"?
I cannot understand how the coefficient of $x^r$ in the continued product $(1+ax+a^2 x^2+\dots+a^p x^p)(1+bx+b^2 x^2+\dots+b^p x^p)(1+cx+c^2 x^2+\dots+c^p x^p)$ is the number of ways of taking $r$ of the letters $a, b, c,\dots$. How is it the number of ways? Also is there any relation between this concept and the distribution of balls into bins?