You will first help Luna Lovegood in the Clock Tower Courtyard. After speaking with her, use Wingardium Leviosa on a bench and move it to the small "X" by the pear tree. Climb up and Reparo the roof, then use Reducto on the "X" to levitate the Swamp Box down. Climb down. The box should be on the big "X" near the fountain. Step back and cast either Incendio or Reducto to make the Swamp Box explode.
You will then help Ginny Weasley in the Transfiguration Courtyard. After speaking with her, use Wingardium Leviosa on the Swamp Box in the tree to suddenly enter a Wizard Encounter with some Slytherins. Once you defeat them, use Wingardium Leviosa on the box again and move it to the big "X". Use Incendio or Reducto and the Swamp Box will explode.
Finally,l go to the Paved Courtyard. No one will be there to tell you what to do, but Ron and Hermione will speak to you. Walk up the stairs and go along the path until you reach the broken pipe. After using Reparo, do the following: climb up the pipe, jump onto the ledge, go past the second pipe, climb up the third pipe, jump onto the roof, run along the rooftop, use Wingardium Leviosa on the Swamp Box, and drop it off the roof. Climb down to the ground. Use Incendio or Reducto. The Swamp Box will explode and Ron will tell you that you are finished.