How is Hess's law a consequence of conservation of energy?