Are you sure these equations are correct? for example, it seems odd to have x stand for pesos rather than p.

Even odder is your demand function:

$x^2 + 62.5p + 2500 = 0 \implies x = \pm \sqrt{-62.5p - 2500}$.

If p is units demanded, then p must be non-negative, implying that the price is not a real number!!!