You put in the passwords when selecting Seraphina for "Which girls data should I read first?". The first time this question pops up is after finishing Night 2 before starting Night 3. When selecting Seraphina the first time is when you discover the hints for both of the passwords, and after selecting her again is when you put in the 1st password. Same with the 2nd password.