Two high school seniors solved a mathematical puzzle that was thought to be impossible