Picture below is from do Carmo's Riemannian Geometry, seemly, the author think that the 2.2 Index Theorem implies the 2.9 Corollary. I don't see that at all. Did the author make a mistake?
In where, $E$ is the energy of curve in the variation. For example, assuming $f(s,t)$ is the variation of $\gamma (t)$, then $$ E(s) =\int_0^a |\partial_t f(s,t)|^2 dt $$



Since $\gamma(a)$ is not conjugate to $\gamma(0)$, the index form is not degenerate. Since it’s a geodesic, $E’(0)=0$.
The index being zero means there are no nonzero vector fields for which the quadratic form is negative and it can’t be zero (since it’s not degenerate). That is, for all nonzero $V$, we have $0<I(V,V)=1/2 E’’(0)$. Thus, $E$ is minimized at zero for some neighborhood and so by continuity of the second derivative, maximized at the endpoint for a small enough region. The converse is similar.