<s>[INST] Complex Numbers (Locus) Find the Cartesian equation of $z$ described by $$\arg\left(\frac{z-2}{z+5}\right)=\frac{\pi}{4}$$
So what I have done is let $z = x+iy$
$$\frac{z-2}{z+5} $$
$$ \frac{x+iy-2}{x+iy+5} $$
$$ \frac{x-2+iy}{x+5+iy} \frac{x+5-iy}{x+5-iy} $$(rationalizing here)
$$ \frac{(x-2)(x+5)+y^2+iy(x+5)-iy(x-2)}{(x+5)^2+y^2}$$
As $\arg\left(\frac{z-2}{z+5}\right)=\frac{\pi}{4}$
$$\arctan(\frac{Im(z)}{Re(z)}) = \frac{\pi}{4}$$
$$\frac{Im(z)}{Re(z)} = \tan(\frac{\pi}{4}) = 1$$
Therefore $$\frac{Im(z)}{Re(z)} = 1$$
Now comparing $im(z)$ and $re(z)$
$$\frac{y(x+5) - y(x-2)}{(x-2)(x+5)+y^2} = 1$$
$$7y = x^2 + 5x - 2x - 10 + y^2$$
$$x^2 + 3x - 10 + y^2 - 7y = 0$$
Now completing the square
$$(x+1.5)^2 + (y - 3.5)^2 = 14.5$$
Therefore locus is a circle with a centre of $(-1.5$ and $3.5i)$ with radius of $\sqrt{14.5}$
Is this correct?
 [/INST] More generaly you can understand the underlying geometry by considering the general case.
Let's define points $P_{j}(z_j)$ where $j=1,2$ in the Argand plane, then if $Q(z)$ is a variable point then such that the angle suntended by the segment $P_1 P_2$ is $\zeta$ then we've the representation $\left(\frac{z-z_1}{z-z_2} \right) =\rho \,\,e^{i\zeta}$ for some $\rho \in \mathbb{R}$ , therefore it's easy to see that $\arg\,\left(\frac{z-z_1}{z-z_2} \right)=\zeta$,

Thus in the given case we've a circle at such that numbers $-5$ and $2$ in the Argand plane subtend a right angle at the centre, then using geometrical properties of circle, specifically using the result that centre of the circle lies along the perpendicular bisector of the chords and using Pythagorean theorem we end up with the centre corresponding to the number $-\frac{1}{2}+ \frac{3}{2}i$ in the Argand plane, which is it
</s>