Given that there are "two equal roots" or "no real roots," make Δ satisfy the matching condition and solve back for the unknown parameter.
Module goal. Push the completing-the-square process through once and for all into a universal formula, and use the expression under the root to judge the roots in advance.
eastmath.com · 11.3 The Quadratic Formula and the Discriminant · 11.3.5 Working Backwards from the Discriminant