Quadratic Solve: Standard Factor Method

The quadratic equation: $$ ax^2 + bx + c = 0 $$ can be factored into:
$$ (x + m)(x + n) = 0; $$ Where, m and n are 2 real numbers such that, $$ m + n = b ; $$ and $$ m * n = a * c ; $$ Hence, the quadratic equation takes the form, $$ ax^2 + mx + nx + c = 0 $$ We shall use gcd-based grouping to solve this equation.
Let: $$ g_1 = gcd(a,m), \quad and \quad g_2 = gcd(n,c) $$ Then, the given quadratic equation can be factored into $$ (g_1 x + g_2)(l_1 x +l_2) = 0 $$ Where, $$ l_1 = \frac{a}{g_1} \quad and \quad l_2 = \frac{c}{g_2} $$ Hence, the solution: $$ x = \frac{-g_2}{g_1} ; \quad and \quad x = \frac{-l_2}{l_1} $$
Example:

Exercise