After acquiring Alohomora III and completing The Polyjuice Plot, make your way to the Headmaster's Upper Study via the Trophy Room floo flame in the Grand Staircase area. Then open the 2nd door on your left in the study which leads out to a balcony and stairs ascending further up the tower. Once you reach the top, unlock the level 3 door and enter the room for the achievement to pop.