As you know, the foci of an ellipse whose equation is $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$are described, if $a^2>b^2$, by the coordinates $(c,0)$ and $(-c,0)$ where $c=\sqrt{a^2-b^2}$. In fact the sum of the distances of a generical point $(x,y)$ from $(c,0)$ and $(-c,0)$ is, as we can see by using the Pythagorean theorem, $$\sqrt{(x-c)^2+(y-0)^2}+\sqrt{(x-(-c))^2+(y-0)^2}$$which we can prove to be the constant $2a$ (assuming $a>0$). In fact, if we plug $c=\sqrt{a^2-b^2}$ into the equation of the ellipse, it becomes $$\frac{x^2}{a^2}+\frac{y^2}{a^2-c^2}=1$$which is equivalent to $$(a^2-c^2)x^2+a^2y^2=a^2(a^2-c^2)$$which is in turn equivalent, as we can see by adding $-2a^2cx$ to both members and rearranging the addends, to $$a^2((x-c)^2+y^2)=a^2(x^2-2cx+c^2+y^2)=a^4-2a^2cx+c^2x^2=(a^2-cx)^2$$which becomes, if we calculate the square root of both members and multiplicate by $4$ $$\pm 4a\sqrt{(x-c)^2+y^2}=4(a^2-cx)$$ but, since $c=\sqrt{a^2-b^2}<a$ and $\frac{x^2}{a^2}\le 1$ (see equation of the ellipse: $\frac{y^2}{b^2}\ge 0$) and therefore, for $x>0$, $cx\le ax\le a^2$, we can chose the sign + in front of the square root:$$0=4(a^2-cx)-4a\sqrt{(x-c)^2+y^2}$$which is in turn equivalent, as we notice if we add $x^2+2cx+c^2+y^2$ to both members, to $$(x+c)^2+y^2=4a^2+(x-c)^2+y^2-4a\sqrt{(x-c)^2+y^2}=\left(2a-\sqrt{(x-c)^2+y^2}\right)^2$$which is finally equivalent, in turn, as we see by calculating the square root of both memebrs, to$$\sqrt{(x+c)^2+y^2}=2a-\sqrt{(x-c)^2+y^2}$$where we chose the positive sign for the square root $\sqrt{(x+c)^2+y^2}$ because $2a-\sqrt{(x-c)^2+y^2}\ge 0$, in fact if $2a<\sqrt{(x-c)^2+y^2}$ then $4a^2<(x-c)^2+y^2$ and $3a^2<x^2+y^2-cx-b^2$ which is impossible because if $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ and $a^2>b^2$ then $\frac{x^2+y^3}{a^2}<1$. The last equality means that the sum of the distances of any point from $(c,0)$ and $(-c,0)$ is $2a$, as we wanted to show.
If $b^2>a^2$ the roles of $x$ and $y$ are inverted and therefore the foci are $(0,\sqrt{b^2-a^2})$ and $(0,-\sqrt{b^2-a^2})$.
The co-ordinates of the focii are $(h\pm ae)$, so your $c$ will be $ae$ rather than $\frac{e}{a}$ and so your $a$ will be $\sqrt2$ and your $b$ will be $\sqrt\frac{3}{2}$.
So the equation we have in the rotated system is:$$\frac{(x-\frac{1}{\sqrt2})^2}{2}+\frac{2y^2}{3}=1$$
Now all that remains is to somehow rotate this back into the original system.
Best Answer
Since you know that the points are colinear and you know their distances from the midpoint, a simple way to find the vertices is to compute the vectors from the midpoint to the foci and scale them to have the right length. You’ve got the midpoint $(5,2)$, so the two vectors are $(2,6)-(5,2)=(-3,4)$ and its negative. The $c$ value is $5$, so these vectors have length $5$ (you can check that for yourself). You need vectors of length $9$: scale them appropriately and add them to the midpoint to get the two vertices.