The action for a string in this background $$G_{IJ}\tag{1}$$ can be written as the Nambu-Goto action
$$S_{NG}=\int d\sigma^1d\sigma^2\sqrt{g}\quad\quad\Rightarrow\quad\mathcal{L}=\sqrt{g}\tag{2}$$
where the induced two-dimensional metric is
$$g_{ab}=G_{IJ}\partial_aX^I\partial_bX^J.\tag{3}$$
This action represents the worldsheet area of the string, a two dimensional Riemannian manifold. This area is minimal if the Euler-Lagrange equations are satisfied but also if an equivalent equation is satisfied: the Hamilton-Jacobi equation, which have this form (see footnote at page 13 in Drukker)
$$G^{IJ}\left(\frac{\delta S}{\delta X^I}\right)\left(\frac{\delta S}{\delta X^J}\right)=G_{MN}\partial_1X^{M}\partial_1X^{N}\tag{4}$$
(in this form), where $$\partial_a=\frac{\partial}{\partial\sigma^a}\,,\quad\sigma=1,2.\tag{5}$$
I know that the Hamilton-Jacobi equation is
$$\frac{\partial S}{\partial t}+H\left(\frac{\partial S}{\partial x},x\right)=0.\tag{6}$$
How this expressions translates into the previous one?
EDIT:
Let me show you what I have. From (2) and the expression of the determinant
$$g=\frac{1}{2}\varepsilon^{ab}\varepsilon^{cd}g_{ac}g_{bd}\tag{7}$$
$$ P_I^a=\frac{\partial\mathcal{L}}{\partial\partial_aX^I}=\frac{1}{\sqrt{g}}\varepsilon^{ab}\varepsilon^{cd}\partial_cX^JG_{IJ}g_{bd}\tag{8}$$
right?
Then
$$\mathcal{H}=P_I^a\partial_aX^I-\mathcal{L}\tag{9}=\sqrt{g}.$$
why is not zero?
EDIT 2
Let us start with an equivalent action, Polyakov
$$S_P=\frac{1}{2}\int d^2\sigma\sqrt{-h}h^{ab}\partial_aX^I\partial_bX^JG_{IJ}.\tag{10}$$
The momentum is
$$P_I^a=\frac{\partial\mathcal{L}_P}{\partial\partial_aX^I}=\sqrt{-h}h^{ab}\partial_bX^JG_{IJ}.\tag{11}$$
Let us choose
$$h_{ab}=\begin{pmatrix} -1 & 0\\ 0 & 1 \end{pmatrix}\,\quad\quad\Rightarrow\sqrt{-h}=1.\tag{12}$$
The Hamiltonian is then,
$$\mathcal{H}_P=\frac{1}{2}\int d^2\sigma h_{ab}P^a_IP^b_JG^{IJ}.\tag{13}$$
Due to reparametrization invariance
$$h_{ab}P^a_IP^b_JG^{IJ}=0,\tag{14}$$
or
$$G^{IJ}P_I^\sigma P_J^\sigma=\partial_\tau X^I\partial_\tau X^JG_{IJ}.\tag{15}$$
Is this correct?