I was trying to find all of the moments for a random variable $X$ with an exponential distribution and mean $\lambda$. I ultimately showed the following:
$M_x(s)=\frac{\lambda}{\lambda-s}=\sum_{k=0}^\infty (s/\lambda)^k$, and given that $M_x(s)=\sum_{k=0}^\infty \frac{s^k}{k!}E[X^k]$, it follows that: $$\sum_{k=0}^\infty \frac{s^k}{k!}E[X^k]=\sum_{k=0}^\infty (s/\lambda)^k.$$.
After seeing my professor's solution, I see that she assumes that the terms being added are equivalent for each individual $k$, i.e. that $\frac{s^k}{k!}E[X^k]=(s/\lambda)^k$, and my question is, why must this be true?