He doesn't trust you enough to let you through the gate. You'll have to show him why you deserve to go through.
It might help to wait until the mermaid can see before you try dealing with the octopus. It won't do you any good to deal with the octopus before you take care of the mermaid anyway.
You need a document that explains how the prince is in trouble.