From the letter and the scratchings on the wall, Alfred was 19 when Reager wrote the letter. From the letter, we know that Alfred just turned two years old in the summer of 1835. So, he was born around the summer of 1833. From the scratchings on the wall, we know that he was locked in the room in October 1852. Therefore, 1852 - 1833 = 19.
The bolded word "Capital" provides a clue of what to shift. "Shift" refers to a
Caesar cipher, a way to encode each letter. A shift of 1 means that A becomes B, B becomes C, Z becomes A, etc. A shift of 2 means that A → C, B → D, Y → A, Z → B, etc.