Wanna know the crank way of doing this?
n is the number of sweets in the bag.
n-1 is the number of sweets left in the bag after the first turn.
What is the total number of possibilities for our sweet draw as described?
n(n-1)
Now, Hannah eats the sweets; they aren't replaced nor does she add surplus sweets to the bag over what has been taken out. So the above expression remains constant.
n(n-1) = c
Expand the brackets and put the equation into the required form:
n^2 - n = c
n^2 - n - c = 0
Let's now find c for just the 6 sweets we know about!
36 - 6 - c =
c = 30
But hang on, that's only 1/3 of all possible outcomes accounted for the stage we are at. So the final expression is:
1/3(n(n-1) = 30
n^2 - n - 90 = 0
Partial marks, haha?

Part (b) is a doddle, but I expect the examiners do actually want you to show the steps of working the quadratic - the joys of school maths!
But the posters above are quite correct - Edexcel are looking for textbook knowledge of probability, counting and quadratics. They also want to see students doing basic modelling with algebra. As the bloke who did it for the BBC said, the difficulty lies in not pointing out the problem strategy, which is common in more routine questions where parts lead you through the required problem solving steps.
The question deserves to be on the higher tier paper.