Hint in case you struggle with the safe code: you get it by just subtracting two numbers which are written on page 3 (the one in the chest; room right next to the safe). From the contents of that page, it should hopefully be pretty obvious which two numbers.
Reply to this comment if you still want more hints.
Please don't post the exact number in comments and spoil the game for some unfortunate soul that happens to randomly glimpse over it