Move right part of the equation to
left part with negative sign.
The equation is transformed from
$$x^{2} = 2 x + 8$$
to
$$x^{2} + \left(- 2 x - 8\right) = 0$$
This equation is of the form
a*x^2 + b*x + c = 0
A quadratic equation can be solved
using the discriminant.
The roots of the quadratic equation:
$$x_{1} = \frac{\sqrt{D} - b}{2 a}$$
$$x_{2} = \frac{- \sqrt{D} - b}{2 a}$$
where D = b^2 - 4*a*c - it is the discriminant.
Because
$$a = 1$$
$$b = -2$$
$$c = -8$$
, then
D = b^2 - 4 * a * c =
(-2)^2 - 4 * (1) * (-8) = 36
Because D > 0, then the equation has two roots.
x1 = (-b + sqrt(D)) / (2*a)
x2 = (-b - sqrt(D)) / (2*a)
or
$$x_{1} = 4$$
$$x_{2} = -2$$