Write an equation for an ellipse if the endpoints of the major axis are at (-8,1) and (8,1) and the endpoints of the minor axis are at (0,-1) and (0,3).

d= sqrt(x2-x1)^2 +(y1-y2)^2
d= sqrt(8--8)^2 + (1-1)^2
d= sqrt 16 + 0
d= sqrt 256
d= 16

Is d=16 supposed to be an equation? Or

d= sqrt(x2-x1)^2 +(y1-y2)^2 ?
Neither are correct.

The general equation of an ellipse, centered at the origin, is
(x/a)^2 + (y/b)^2 = 0
In this equation, a is 1/2 of the major axis and b is 1/2 of the minor axis, assuming the long axis is horizontal, as it is here.
In this case, the major axis is along y = 1 and the minor axis is along x=0. For this situation, the equation must be rewritten
(x/a)^2 + (y-1)/b^2 = 0
where a = 8 and b = 2
Thus x^2/64 + (y-1)^2/4 = 0
Verify by plugging in your given endpoints. When y=1, x = +/-8 etc.