We show that an invariant surface allows to construct the Jacobi vector field along a geodesic and construct the formula for the normal component of the Jacobi field. If a geodesic is the transversal intersection of two invariant surfaces (such situation we have, for example, if the geodesic is hyperbolic), then we can construct a fundamental solution of the the Jacobi-Hill equation. This is done for quadratically integrable geodesic flows.