If the foci are at #(-12, 0) and (12,0)#, then the endpoints #(0, -5) and (0,5)# must be on the minor axis; not the major axis. The general equation for the an ellipse with horizontally oriented foci is:

#(x - h)^2/a^2 + (y - k)^2/b^2 = 1" [0]"#

The minor axis endpoints are #(h, k - b) and (h, k + b)#

The foci are are #(h - sqrt(a^2 - b^2), k) and (h + sqrt(a^2 - b^2),k)#

Using the points, #(0, -5) and (0,5)#, we can write the following equations:

#h = 0" [1]"#

#k - b = -5" [2]"#

#k + b = 5" [3]"#

Using the points, #(-12, 0) and (12,0)#, we can write the following equations:

#k = 0" [4]"#

#h - sqrt(a^2 - b^2) = -12" [5]"#

#h + sqrt(a^2 - b^2) = 12" [6]"#

Substitute 0 for k into equation [3]:

#b = 5#

Substitute 0 for h and 5 for b into equation [6]:

#0 + sqrt(a^2 - 5^2) = 12#

#a^2 = 144 - 25#

#a = sqrt(119)#

Substitute the know values into equation [0]:

#(x - 0)^2/(sqrt119)^2 + (y - 0)^2/5^2 = 1" [7]"#

Equation [7] is the one that I think that you want.