The standard form for the equation of a circle is :
(x−h)^2+(y−k)^2=r2 ----------- EQ(1)
where handk are the x and y coordinates of the center of the circle and r is the radius.
The center of the circle is the midpoint of the diameter.
So the midpoint of the diameter with endpoints at (2,-5)and(8,-9) is : ((2+(8))/2,(-5+(-9))/2)=(5,-7)
So the point (5,-7) is the center of the circle. Now, use the distance formula to find the radius of the circle:
r^2=(2−(5))^2+(-5−(-7))^2=9+4=13
⇒r=√13
Subtituting h=5, k=-7 and r=√13 into EQ(1) gives : (x-5)^2+(y+7)^2=13