This chapter describes how to open the door in Block B. You will need to solve this puzzle on your second visit to the Asylum as Black. This happens after you have completed the quest "Working for Robert Ramsey". The puzzle involves one of the patients, John Keating.
Exploring Block B, you will walk past John Keating's camera and reach the locked door shown in the screenshot. You will need a four-digit code.
Return to Keating's cell and listen to a short conversation with him - this is a hint. You need to check the cameras from the previous corridor and find the numbers that are part of the code.
Start with the camera next to where you started exploring this part of the hideout. Use an ultraviolet lamp to light up the wall and find out one of the numbers - in my case, this is 1.
Go to the next chamber and use the lamp again. Mathematics comes into play - in my case it was 4 + = 4 8.
Visit the next camera. You will need to add all the numbers - in my case it was 1+2+1+0=4.
Find the last camera. Just add up the winning numbers - in my case it was 2 + 2 + 1 = 5.
Return to the closed door and enter the code. I had it 1845, but due to a random scenario, you might have to use a different code (based on the numbers on the walls).