I have a problem as below: Given a complex number $z$ which satisfies the expression: $$ |z - 10| + |z + 10| = 12 \sqrt5 $$
Find the maximum value for $$ P = |z - 4 - 22i| $$
For this problem, I have a prediction as follow:

as you can see in the picture, that is the intuitive graph for the eclipse of the given expression and the point $A(4, 22)$ for the expression $P$
I predict that the value of $P$ is maximized if it is on the green line and crossed with the eclipse. Therefore the maximum value of $P$ is from the point $A$ to the crossed point of the green line with the eclipse.
However, that is my prediction for this problem without proof. Luckily, it gives the right answer but I have no idea for any reason.

If the point of intersection $p=(-5.2\dots,-8.2\dots)$ maximised $P$, the green line would be orthogonal to the ellipse at $p$, i.e. the gradient of the ellipse's implicit representation $\frac{x^2}{180}+\frac{y^2}{80}=1$ at $p$ would be in the same direction as the green line. It is not: the green line's slope is $\frac{22-4\sqrt5}4=3.263\dots$ while the gradient is $3.518\dots$
The correct maximiser is obtained by obtaining the equation corresponding to green line orthogonality and solving it. This gives $p=(-6,-8)$ for a maximal $P$ of $10\sqrt{10}$.