This sounds similar to another game I've seen (never played) that you are trapped in a security closet and trying to assist another person in both freeing you and escaping the dungeon you both find yourselves in using the door locks and CCTV cameras and things of that nature that you have access to in your prison. I think it even came before Five Nights at Freddy's, but I don't remember the name of the game.
In a way, the game play ends up being like Lemmings or ICO, where you're solving a puzzle indirectly for another character to get beyond.