In the Hamiltonian formalism, a symmetry is defined as transformation generated by a function $G$ is a symmetry if $$\{G,H\}=0 ,$$ where $H$ denotes the Hamiltonian.
On the other hand, a symmetry is a transformations which map each solution of the equation of motion into another solution. And this requires that the form of the equation of motion remains unchanged.
Therefore, it should be possible to show that it follows from $\{G,H\}=0 $ that Hamilton's equations are unchanged by the transformation generated by $G$.
Concretely, we have
\begin{align} q \to q' &= q + \epsilon \frac{\partial G}{\partial p} \\ p \to p' &= p - \frac{\partial G}{\partial q} \\ H \to H' &=H + \{H,G\} \end{align} and we want to show that if for the original $q$ and $p$ Hamilton's equations \begin{align} \frac{dp}{dt}&= -\frac{\partial H}{\partial q} \\ \frac{dq}{dt} &= \frac{\partial H}{\partial p} \end{align} hold, they also hold for $q'$ and $p'$: \begin{align} \frac{dp'}{dt}&= -\frac{\partial H'}{\partial q'} \\ \frac{dq'}{dt} &= \frac{\partial H'}{\partial p'} \end{align} How can this be shown explicitly?
Using the transformation rules explicitly yields for Hamilton's first equation \begin{align} \frac{dp}{dt}&= -\frac{\partial H}{\partial q} \\ \therefore \quad \frac{d(p' + \frac{\partial G}{\partial q})}{dt}&= -\frac{\partial (H + \{H,G\} )}{\partial (q' + \epsilon \frac{\partial G}{\partial q} )} \\ \therefore \quad \frac{d(p' + \frac{\partial G}{\partial q})}{dt}&= -\frac{\partial H }{\partial (q' + \epsilon \frac{\partial G}{\partial q} )} \\ \end{align}
But I've no idea how to proceed from here.