Question 33062
Equilibrium means D=S
So, -p^2+30p-8=-5p+40
p^2-35p+48=0
a=1, b=-35, c=48
*[invoke quadratic "p",1,-35,48]
Since item counts must be whole numbers, round 
the values of "p" down to a whole number.
Hope this helps.
Cheers,
Stan H.