How does the trap work?

The proof is in the picture!