Is the following logic correct?:
If you have an Hamiltonian, that has time has a variable explicitly, and you get the Lagrangian $L$ from it, and then you get an equivalent $L'$, since $L$ has the total time derivate of a function, both Lagrangians will lead to the same equations Euler-Lagrange equations right? If so, and if you get you get the Hamiltonian from $L'$, and you find the Hamilton equations from it will they be equal to the original Hamiltonian's Hamilton equations?
If it is of any help, the given Hamiltonian is:
$$H = \frac{p^2}{2m} - bqpe^{-\alpha t} + \frac{ba}{2}e^{-\alpha t}(\alpha + b e^{-\alpha t}) + \frac{kq^2}{2} \, .$$