Answer
$\frac{x^2}{4} + \frac{3y^2}{16}=1$
Work Step by Step
Step 1. Identify the given values: use the diagram given in the Exercise, we can identify one endpoint at $(2,0)$ and we also know that point P$(-1,2)$ is on the ellipse.
Step 2. Write a general equation: since we do not know which one is the major axis, we need to test different situations, write an equation as $\frac{x^2}{a^2} + \frac{y^2}{b^2}=1$ where $a\gt b\gt0$. and see if it fits.
Step 3. Find the unknowns: plug-in the coordinates of the end point and P, we have
$\frac{(2)^2}{a^2} + \frac{0^2}{b^2}=1$ which gives $a=2$, and $\frac{(-1)^2}{2^2} + \frac{2^2}{b^2}=1$ which gives $b^2=\frac{16}{3}$ and $b\approx2.3\gt a$, so that this is not the solution.
Step 4. Write a different general equation: $\frac{x^2}{b^2} + \frac{y^2}{a^2}=1$ where $a\gt b\gt0$. and see if it fits.
Step 5. In this case, $\frac{(2)^2}{b^2} + \frac{0^2}{a^2}=1$ which gives $b=2$, and $\frac{(-1)^2}{2^2} + \frac{2^2}{a^2}=1$ which gives $a^2=\frac{16}{3}$ and $a\approx2.3\gt b$, so that this is the solution.
Step 6. Conclusion: the equation for the graph can be written as $\frac{x^2}{4} + \frac{3y^2}{16}=1$