In the following notes here I don't understand the very last line of proof of theorem 6.1 .
We now use the fact that $\frac{\partial}{\partial a}S[x_a(t)]$ must be zero for any function $\beta(t)$, because we are assuming that $x_{0}(t)$ yields a stationary value.