Collect as many beans before going to Hogwarts (50 will work). When you get to Hogwarts buy the Beans Bag which holds 100 beans. When you go out of the gryffindor tower you'll see a thing in the corner. Hit it with Flipendo and 3 beans will come out. Hit it again and no beans will come out. Now go around the corner (3 steps after the corner) then come back. Hit the thing again and then 3 beans will come out. Repeat the process and then u will be able to get Alahamora.