The centre of the circle $x^2+y^2+2gx+2fy+c=0$ is $(-g, -f)$.
We are given that the centre is $C(3,-2)$. So, $-g=3 \implies g=-3$ and $-f=-2 \implies f=2$.
The equation of the circle is $x^2+y^2-6x+4y-23=0$.
The radius of the circle is $r = \sqrt{g^2+f^2-c} = \sqrt{(-3)^2+2^2-(-23)} = \sqrt{9+4+23} = \sqrt{36}=6$.
We need to find a point A on the circle that has the least distance from the point P(-1,-5).
The point A lies on the line segment connecting the centre C and the point P. It is the intersection of the line segment CP and the circle, closer to P.
The coordinates of the centre are $C(3, -2)$ and the external point is $P(-1, -5)$.
Point A divides the line segment CP internally in the ratio $r:d-r$, where $d$ is the distance CP. A simpler way is to find the point that divides CP externally in the ratio $d:r$ from P's perspective or internally in the ratio $(d-r):r$ from C's perspective. The point of least distance A divides CP internally in the ratio $r: (d-r)$, but it is easier to think of it as A divides the segment PC in the ratio $r: (d-r)$. This is complicated.
A simpler approach: A divides the line segment PC in the ratio $(d-r):r$. No, that's not right.
A divides CP in some ratio. Let's find the ratio. A is on the circle. C is the center. P is outside. The closest point A is on the line segment CP. The ratio CA:AP is required. We know CA = radius = 6. Let's find the distance CP.
$d = CP = \sqrt{(3 - (-1))^2 + (-2 - (-5))^2} = \sqrt{4^2+3^2} = \sqrt{16+9} = \sqrt{25}=5$.
Wait, the distance from the centre to P is 5, which is less than the radius 6. This means the point P(-1,-5) is inside the circle.
If P is inside the circle, the point A on the circle with the least distance to P is on the line extending from C through P to the circle.
Point A divides the segment PC externally. The ratio is $CA:AP = 6:1$. So A divides the segment CP in the ratio 6:-1 is not right.
Let's use the section formula. Let A be $(x,y)$. A divides the segment CP in the ratio $C-A-P$. This means P divides CA in some ratio.
No, let's reconsider. The line passing through C(3,-2) and P(-1,-5) contains the point A.
The distance $CP=5$. The point A is on the circle at a distance of $r=6$ from C.
The point of minimum distance A is on the line segment from P, extending away from C.
The distance $PA = r - d = 6 - 5 = 1$.
The point A divides the segment CP externally, with P between C and A.
A is on the line CP. P divides CA in the ratio $5:1$.
Let $A=(x,y)$. Then $P = \left(\frac{1 \cdot C_x + 5 \cdot A_x}{1+5}, \frac{1 \cdot C_y + 5 \cdot A_y}{1+5}\right)$.
$-1 = \frac{1(3)+5x}{6} \implies -6 = 3+5x \implies 5x = -9 \implies x=-9/5$.
$-5 = \frac{1(-2)+5y}{6} \implies -30 = -2+5y \implies 5y = -28 \implies y=-28/5$.
So, A is $(-9/5, -28/5)$.