Have you unlocked the jail cell upstairs near the Level 2 well entrance?
Find the key in Philip's cabinet in the room where you met Edgar.
Return upstairs through the well to the barred doorway.
Unlock the bars and go through the next door.