I think there are multiple configurations for the second puzzle that are valid but only one gives the key. No clue what to do in the forth room.