Getting undefined when using quadratic equation

b² is (-12)² which is 144, not -144.

Your entire square root is negative, which is undefined as far as this is concerned. Get rid of that negative and you’ll be correct.