For the puzzle game the password to the safe which is behind the board you cut down is 8455179. You get this by counting the number of letters in the last page of the board note "Helpmehe ipme pleas ehelp m eplease helpmehel"
before using the key on the door make sure the lights are off. when she asks you for "any last words" use the book on the right wall with the summoning circle.
No clue what the 4 digit key pad is for though. I did find a code on the top left wall when you turn off the lights before lighting the candle but it doesn't seem to do anything.