This topic of optimization is tough for me to grasp and having lots of trouble with the problems

Question

a rectangle has its base on the x-axis and its upper two vertices on the parabola y = 12-x^2. what is the largest area the rectangle can have, and what are its dimensions ?

I drew a diagram of a parabola going to the negative and then the rectangle in it

but now would I set the area of a rectangle A = xy equal to the equation above?