The usual definition for the "derivative" of a formal power series is $$
\left(\sum_{k=0}^\infty a_k z^k\right)' = \sum_{k=1}^\infty ka_kz^{k-1} = \sum_{k=0}^\infty a'_k z^k \quad\text{where}\quad a'_k = (k+1)a_{k+1} \text{,}
$$
i.e. one simply assumes that the series may be differentiated term-wise.
Now you just need to put that into the differential equation, and show that the resulting equation determines the $a_k$ uniquely. For that, you can use that for formal power series $$
\sum_{k=0}^\infty a_k x^k = \sum_{k=0}^\infty b_k x^k \quad\Leftrightarrow\quad a_k = b_k \text{ for all $k$.}
$$
In other words, you reason that for the differential equation to hold, the formal power series on the left-hand side of the ODE must have all coefficients equal to zero.