Walk on walls:
During your first "Dark Against The Arts" class, you will learn "Reparo". You will be in a room for testing only when you learn that spell. Do not use Reparo on anything in the room. If you use Reparo to get on the cabinet, when you get back down you will find that you can walk on walls and out of the screen. However, you cannot get any farther and must start from the beginning.
When reach Moody's challenge after the second task, he will ask you to face creatures that you already know of, and to not repeat spells that you have already used. Immediately after you complete Moody's challenge you will go to the third task. You can then defeat Voldemort after the third task.