Find the functions x(t) and y(t) that maximize $\displaystyle \int_0^1(4x-y^2)dt$ subject to $\displaystyle \dot x = y, x(0)=1, x(1)=2$

So I formed the Hamiltonian:

$\displaystyle H=4x-y^2 + \lambda y$

And took the partials:

$\displaystyle \frac{\partial H}{\partial x} = 4 = -\dot \lambda$

I've assumed that x must be the state variable, but can someone describe why it must be so?

$\displaystyle \frac{\partial H}{\partial y} = -2y + \lambda = 0$

Now what? Please explain as if you are talking to an idiot child, which I am.