It's just a bit of rearranging:
Given y = [itex]\sqrt{ax^{2} + bx + c}[/itex]
[itex]y^{2}[/itex] = a[itex]x^{2}[/itex] + bx + c.
So replace a[itex]x^{2}[/itex] + bx + c from the initial equation with [itex]y^{2}[/itex].
Replace the [itex]\sqrt{ax^{2} + bx + c}[/itex] part of the initial equation with y.
Move q from one side of the equation to the other.
Presto chango, [itex]y^{2}[/itex] + py - q = 0.