[step:Differentiate the parameter equations to obtain the first Hamilton equation]
For $x\in J$, set
\begin{align*}
p(x):=\nabla_yS(x,y(x),\alpha_0).
\end{align*}
Differentiate the identity
\begin{align*}
\nabla_\alpha S(x,y(x),\alpha_0)=\beta
\end{align*}
with respect to $x$. Since $\beta$ is constant, this gives
\begin{align*}
S_{x\alpha}(x,y(x),\alpha_0)+S_{y\alpha}(x,y(x),\alpha_0)^\top y'(x)=0.
\end{align*}
Now differentiate the Hamilton-Jacobi equation
\begin{align*}
\partial_xS(x,y,\alpha_0)+H(x,y,\nabla_yS(x,y,\alpha_0))=0
\end{align*}
with respect to $\alpha$ while holding $(x,y)$ fixed. The chain rule gives
\begin{align*}
S_{x\alpha}(x,y,\alpha_0)+S_{y\alpha}(x,y,\alpha_0)^\top\partial_pH(x,y,\nabla_yS(x,y,\alpha_0))=0.
\end{align*}
Evaluating at $y=y(x)$ and using $p(x)=\nabla_yS(x,y(x),\alpha_0)$, we obtain
\begin{align*}
S_{y\alpha}(x,y(x),\alpha_0)^\top\left(y'(x)-\partial_pH(x,y(x),p(x))\right)=0.
\end{align*}
After shrinking $J$ if necessary, $S_{y\alpha}(x,y(x),\alpha_0)$ remains invertible by continuity and the invertibility of $M_0$. Hence
\begin{align*}
y'(x)=\partial_pH(x,y(x),p(x)).
\end{align*}
[/step]