Consider a system of the form:
dx/dt=F(y)
dy/dt=G(x)
That is, dx/dt depends only on y and dy/dt depends only on x.
What is the Hamiltonian function?
Compute the lagrangian $\displaystyle L$ and then
$\displaystyle H = \sum^{i} p_{i}q_{i} - L $
where $\displaystyle p_{i} = \frac{\partial L}{\dot{q_{i}}}$ are the canonical momenta conjugated to the $\displaystyle q_{i}$ coordinates and $\displaystyle \dot{q_{i}} = \frac{d}{dt}q_{i}$