Step 1:
The coordinates of vertices and foci given are $( 0, \pm 5 )$ and $(0, \pm 8 )$ respectively.
Clearly the vertices lie on the y - axis.
Hence the equation should be of the form $ \large\frac{y^2}{a^2}$$ - \large\frac{x^2}{a^2}$$=1$
Since the vertices are $( 0, \pm 5 )$ a = 5
Since the foci are $(0, \pm 8)$, c = 8
$ \therefore c^2 = a^2+b^2$
Substituting the values for a and c we get,
$ 5^2+b^2=8^2$
$ \therefore b^2 = 64-25 = 39$
The equation of the hyperbola is
$ \large\frac{y^2}{25}$$ - \large\frac{x^2}{39}$$=1$