Why do safe jumps work?

What's the math behind it here