We want vertex form: y-k=(x-h)^2.
Re-write P(x)=21+24x+6x^2 as P(x)=6x^2 + 24x + 21
Factor the first 2 terms as shown: P(x)=6(x^2+4x )+ 21
complete the square of (x^2+4x): P(x) =6(x^2 + 4x + 4 - 4) + 21
Rewrite the quadratic: P(x) = 6(x+2)^2 - 24 + 21
Simplify this result: P(x) = 6(x+2)^2 - 3
Compare this to y-k = a(x-h)^2
Identify k as -3 and h as -2; vertex is at (-2,-3)
P(x) in vertex form is P(x) = 6(x+2)^2 - 3