Go down the grand staircase and enter through the doors on the right. Head to the far right corner of the hall and ask the person on the far right end of the last table for the book. She will give it to you with no hassle- you can now return to Flitwick with your essay.