The Detective Boys realize that the riddle is a reference to shogi and that the dragon refers to a promoted rook. They take the direction a rook is placed on the shogi board and escape the cave.
Save my name, email, and website in this browser for the next time I comment.