Anderson was the only one who knew what Amenra had done, and he was the only one who could see that he came to justice.
Anderson worked day and night on his plan. He knew he had to somehow get Amenra to admit to his crime while someone was listening, but how was the question. He thought about recording Amenra's bedroom in case he said something (he would notice), watching security footage of the night the crime took place (Amenra should have wiped it clean), and even just going to his father and telling him what happened (but would he believe him?). Then finally, Anderson remembered the secret passages.