You thought the maze looked fun, but now you can’t find your way out. Luckily, mathematics is here to help you escape, says Katie Steckles