Let denote the center of the ellipse. Then the equation of the ellipse is:
The length of the semi-axis pointing in x-direction is 3 and the length of the semi-axis pointing in y-direction is
Plug in these values to get the equation of the ellipse:
The second example has to be done in just the same way. Only the coordinates of the center has changed to C(-6, 0)