Suppose $$f(x) =\frac{a_0}{2}+\sum_{k=1}^\infty a_k\cos(kx)+b_k\sin(kx) $$
Then what is $$S(x)=\frac{a_0}{2}+\sum_{k=1}^\infty a_k\cos(2kx)+b_k\sin(2kx)$$ in terms of $f(x)$. I tried writing down things in terms of the inner products $$\begin{aligned}a_k&=\left\langle f(x),\cos(kx)\right\rangle=\left\langle S(x),\cos(2kx)\right\rangle, \\ b_k&=\left\langle f(x),\sin(kx)\right\rangle=\left\langle S(x),\sin(2kx)\right\rangle\end{aligned}$$ and this did not help. I also wrote down the integrals$$b_k=\frac{1}{\pi}\int_{-\pi}^\pi S(x)\sin(2kx)\, dx=\frac{1}{\pi}\int_{-\pi}^\pi f(x)\sin(kx)\, dx$$ then equating integrands and using the double angle formula for sin you get $$S(x)=\frac{f(x)}{2\cos(kx)}$$ but this doesn't seem to make sense. I also separated the even and odd coefficients of $f$ and that did not help me either. The answer is not $f(2x)$.
If $f(x) = \sum_{k \in \mathbb Z} c_k e^{ikx}$, then $f(2x) = \sum_{k \in \mathbb Z} c_k e^{i2kx}$. If we define $d_k$ to be the coefficients of $f(2x)$, $$ f(2x) =: \sum_{k \in \mathbb Z} d_k e^{ikx},$$ we find that $c_k \neq d_k$, but instead $d_{2k} = c_k$, and $d_{2k-1}=0$. That is, $$ d_k = \begin{cases} c_{k/2} & k \ \text{even,} \\ 0 & k \ \text{odd.} \end{cases}$$ Hence (as mentioned in comments) you cannot equate the coefficients like that. The equality $$ \sum_{k \in \mathbb Z} c_k e^{i2kx} = \sum_{k \in \mathbb Z} d_k e^{ikx} $$ is valid (by its very definition) but one has to be more careful when equating the coefficients.