Any idea how to solve this problem?
In classical mechanics, the action $S$ is defined as $$S[q(t)] = \int_{t_0}^t L(q(t'), \dot q(t'), t')\; dt'$$ where $L$ is the Lagrangian function (also called Lagrangian) and $q$ is some generalized coordinate of the system.
a) ...
b) For classical paths with a fixed starting point $q(\tau_0) = q_0$, one can interpret $S$ as a function of $q_{\tau}$ and $\tau$, i.e. $S = S(q_{\tau}, \tau)$.
Show that $$\frac{\partial S}{\partial q_{\tau}}=p_{\tau}\;, \qquad \;\;\frac{\partial S}{\partial \tau}=-H$$ where $H$ is the Hamiltonian function of the system.
Hint: For some fixed starting point $q_0$, each path can be parametrized by some arbitrary point $q_{\tau}$ on that path such that $q(t)$ itself can be thought of as a function of both $q_{\tau}$ and some general time $t$.