Find the functions x(t) and y(t) that maximize subject to

So I formed the Hamiltonian:

And took the partials:

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

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