This is the problem in full:
There are $n$ sweets in a bag. $6$ of the sweets are orange. The rest of the sweets are yellow. Hannah takes at random a sweet from the bag. She eats the sweet. Hannah then takes at random another sweet from the bag. She eats the sweet. The probability that Hannah eats two orange sweets is $\dfrac{1}{3}$.
a. Show that $n^2-n-90=0$.
b. Solve $n^2-n-90=0$ to find the value of $n$.
Here is how to tackle the problem using the tree diagram.