http://www.mathopenref.com/coordgeneralellipse.html
If the centre is (0,0)
Let the end of the horizontal axis is A(5,0)
The foci is $$S_1(3,0)$$
If you sketch this it is easy to see that the other foci is $$S_2(-3,0)$$
Let the point B(0,b) be the end of the vertical axis.
NOW
$$\\S_1B=BS_2
S_1A+AS_2\;\; must\; \;equal \;\; S_1B+BS_2\\\\
2+8=S_1B+BS_2\\\\
10=5+5\\\\
so\\\\
B(0,4)\\\\
$equation of the ellipse$\\\\
\frac{x^2}{5^2}+\frac{y^2}{4^2}=1\\\\
\frac{x^2}{25}+\frac{y^2}{16}=1$$