1. The problem statement, all variables and given/known data

Consider a canonical transformation with generating function

[tex]F_2 (q,P) = qP + \epsilon G_2 (q,P)[/tex],

where [tex]\epsilon[/tex] is a small parameter.
Write down the explicit form of the transformation. Neglecting terms of order [tex]\epsilon^2[/tex] and higher,find a relation between this transformation and Hamilton's equations of motion, by setting [tex]G_2=H[/tex] (why is this allowed?) and [tex]\epsilon = dt[/tex].

2. The attempt at a solution

I think the transformation equations are

[tex]\delta p = P - p = -\epsilon \frac{\partial G_2}{\partial q}[/tex]

You have the choice ! Every function G(q,P) (which is smooth enough) will generate a canonical transformation. So you may just as well use H(q,P), and then - that's the whole point - the transformation equations from (q,p) into (Q,P) give you simply the genuine time evolution where epsilon is the small time step. For an arbitrary G that isn't the case of course, you've just transformed your coordinates (q,p) in some other (Q,P). But for G = H, you've transformed the coordinates (q,p) in what they will be, a small moment later !
The reason for that is that your transformation equations you've found for an arbitrary G are what they are, and become the Hamilton equations of motion when you pick G to be equal to H.

Now, strictly speaking we should write H(q,P) instead of H(q,p), but we can replace the P by p here, because they are only a small amount different.