What I was thinking was instead of going from the Nambu-Goto action, doing it from the Polyakov.

https://en.wikipedia.org/wiki/Polyakov_action

Using diffeomorphisms and Weyl transformation, with a Minkowskian target space, one can make a physically insignificant transformation thus writing the action in the conformal gauge which is basically what we have here.

Then put light cone coordinates and do it in natural units.

Another way I thought of doing it is directly doing this substitution.

$$

\delta S=\int_{\tau_{i}}^{\tau_{f}} d \tau\left[\delta X^{\mu} \mathcal{P}_{\mu}^{\sigma}\right]_{0}^{\sigma_{1}}-\int_{\tau_{i}}^{\tau_{f}} d \tau \int_{0}^{\sigma_{1}} d \sigma \delta X^{\mu}\left(\frac{\partial \mathcal{P}_{\mu}^{\tau}}{\partial \tau}+\frac{\partial \mathcal{P}_{\mu}^{\sigma}}{\partial \sigma}\right)

$$

$$

\frac{\partial \mathcal{L}}{\partial \dot{X}^{I}}=\frac{1}{2 \pi \alpha^{\prime}} \dot{X}^{I}=\mathcal{P}^{\tau I}

$$

That's it I think?