On the other hand, Calculus is often used in this Pre-Calc section, so are you really alowed to use Calculus?
If you are, then follow the replies given above, where they used f'(x) = 0 when the tangent line is horizontal.
If you are not allowed, or you are not into Calculus yet, then you can use Analytic Geometry, or the properties of a parabola, to solve the problem/question.
So, if the horizontal line y = 12 is tangent to the parabola, and the parabola has two x-intercepts, then the y=12 line can only be tangent to the highest point, the vertex, of the parabola. The parabola being "vertical, or its axis of symmetry being vertical.
The parabola is symmetrical about its axis of symmetry. So the x-intercepts are equidistant from the axis of symmetry.
The absolute distance between the two x-intercepts is (3 +9) = 12 units. Half of that is 6 units. So the axis of symmetry is at x = 3.
Hence, since the vertex is tangent to the given y = 12 line, then the vertex of the parabola is at point (3,12).
Also, since the vertex is the highest point, then the vertical parabola opens downward.
A standard form of a vertical parabola whose vertex is at (h,k), and that opens downward is:
(y-k) = -a(x-h)^2 -----(i)
Using intercept (-3,0),` and (h,k) = (3,12),
(0 -12) = -a(-3 -3)^2
-12 = -a(36)
a = 12/36 = 1/3
Therefore, the parabola is
(y -12) = -(1/3)(x -3)^2 -----------answer.
If you want to simplify or convert that to the form y = ax^2 +bx +c,
y -12 = (-1/3)(x^2 -6x +9)
y = -(1/3)(x^2) +2x -3 +12
y = (-1/3)(x^2) +2x +9 -----------------answer also.