how did you get that formula? is there a way to solve this with derivatives?

Given a parabola and if they intersect exactly once then the equation (of the intersection) has exactly one solution, this is a quadradic so, . We want this quadradic to has exactly one real solution that happens when the discrimant is zero.

(We want it to have exactly one solution because a tangent line to a parabola intersects it exactly one time. )