My textbook contains this step and I can't follow:
First, it gives the definition of cosine as a series:
$$ cos(x)=\sum\limits_{k=0}^{\infty}(-1)^k \frac{x^{2k}}{(2k)!} $$
Secondly, it proves an identity, where the step happens:
$$ cos(x) * cos(y)= \sum\limits_{n=0}^{\infty} \sum\limits_{k=0}^{n}(-1)^k \frac{x^{2k}}{(2k)!} (-1)^{n-k} \frac{y^{2(n-k)}}{(2(n-k))!}$$
If you plug in the definition above into $cos(x) * cos(y)$ it should give you $$ cos(x)*cos(y)= (\sum\limits_{k=0}^{\infty}(-1)^k \frac{x^{2k}}{(2k)!}) (\sum\limits_{k=0}^{\infty}(-1)^k \frac{y^{2k}}{(2k)!})$$
Therefore, I assume, there has to have been a step, where this happend:
$$ cos(x)*cos(y)= (\sum\limits_{k=0}^{\infty}(-1)^k \frac{x^{2k}}{(2k)!}) (\sum\limits_{k=0}^{\infty}(-1)^k \frac{y^{2k}}{(2k)!})=\sum\limits_{n=0}^{\infty} \sum\limits_{k=0}^{n}(-1)^k \frac{x^{2k}}{(2k)!} (-1)^{n-k} \frac{y^{2(n-k)}}{(2(n-k))!}$$
How are these two terms equal? I tried computing a few specific examples of this kind or rearrangement and it didn't work out. Would we not sum additional things each time, because for every iteration of the first sum signs we sum all the terms up to n again in the second iteration?
I added the original equation from the book, but it seems to be exactly the one I typed above. I guess the book is just wrong then

This is an application of the Cauchy product of power series.
Comment:
In (1) we rearrange the terms according to increasing $n$ and the corresponding contributions from $x$ terms and $y$ terms.
In (2) we substitute the index $l$ by $n-k$.
In (3) we collect $(-1)^k$ and $(-1)^{n-k}$ and use the binomial coefficient \begin{align*} \binom{2n}{2k}=\frac{(2n)!}{(2k)!(2n-2k)!} \end{align*}