Solution (source code)

= Solution

The <Nambu–Goto action> is
$$
S_{\rm NG}=-\frac1{2\pi\alpha'}\int_\Sigma d^2\sigma\,
\sqrt{-\det\gamma_{ab}},
\qquad
\gamma_{ab}=\partial_aX\mathbin\cdot\partial_bX.
$$
The metric equation of the Polyakov action is $T_{ab}=0$, which says
$$
\gamma_{ab}=\frac12h_{ab}h^{cd}\gamma_{cd}.
$$
Thus $h_{ab}$ is conformal to the <induced worldsheet metric>, $h_{ab}=e^{2\omega}\gamma_{ab}$. Substitution into the Polyakov action cancels the conformal factor and yields
$$
S_{\rm P}=-\frac1{2\pi\alpha'}\int d^2\sigma\sqrt{-\det\gamma}=S_{\rm NG}.
$$
The two actions are therefore classically equivalent after the auxiliary worldsheet metric is eliminated.