Let be the circle $(x + 1)^2 + (y + 3)^2 = 25$ and two points $A(5,5)$ and $B(2,1)$ and the point $M(x,y)$ lies on the circle. Find the least and the greatest value of the sum $AM+BM$.
I tried.
Suppose $M(-1+5 \sin \varphi, -3 + 5 \cos\varphi)$, $\varphi \in [0,2\pi]$. We have $$AM+BM=\sqrt{97-60 (\cos \varphi+ \sin \varphi)}+\sqrt{50-40 \cos \varphi-30 \sin \varphi}$$ From here, I can't solve the problem.
Indeed, your approach is correct in principle, but you've discovered for yourself that it is a nightmare to pursue. Fortunately, there are two helpful tricks, hidden on purpose in the problem, without which we would have a hard time solving it.
The first helpful trick is to notice that $B$ lives on the circle. In $\triangle ABM$ we have $AB \le AM + BM$, which provides a lower bound for your sum. Taking $M = B$ this bound is reached, therefore the minimum of $AM + MB$ is $AB = 5$.
The second helpful trick is to notice that the points $A$, $B$ and $C = (-1, -3)$ (the center of the circle) are collinear. (How did I see it? I've sketched the figure, and once I've guessed it I verified it rigorously using a formula for collinearity). Let $d$ be the line on which these points lie. $d$ intersects the circle in two points: one is $B$ itself, and let $M$ be the other one. Notice that $M$ is opposite to $B$ on the circle, therefore this position maximizes the distance $MB$ (and the maximum is precisely the diameter, $10$). Notice that this position also maximizes $AM$ (making it equal to the diameter plus $BA$, for a total of $10 + 5 = 15$). Since this specific $M$ maximizes both $AM$ and $BM$, it will clearly also maximize $AM + BM$, making it $25$.
To conclude, the minimum is $5$, when $M = B$, and the maximum is $25$, when $M$ is opposite to $B$ on the circle.