This. Focus on using the knowledge you got from the password to prevent the death. It'd be unfair if choices before you knew he was about to die determined if you could save him enough. Trust that I've made this as fair as I can without just giving you the answer.