Impossible Escape?

The other day I heard a really interesting puzzle.

It’s one of those proverbial prisoner problems where you are condemned to die unless you can prove your intelligence to a devious jailer. You, and your friend, are incarcerated. Your jailer offers a challenge. If you complete the challenge you are both free to go. Here are the rules:

Impossible Escape?.