https://community.wolfram.com/groups/-/m/t/2172546
ComplexPlot since V12.0 is very handy to solve this type of problem. Typically when the contour/mesh line that I am looking for passes through zeros and poles.
The first plot shows a yellow contour traverses the regions of color corresponding to 0,π or -π according to the legend. z 
z-3I
z(z+1)
maps every point on this curve to some real number
In[]:=
ComplexPlot
(z-3I)
z*(z+1)
,{z,-2-I,2+4I},​​PlotLegendsAutomatic,​​Mesh{{0},{0}},​​MeshFunctions{Im[#2]&,Im[#2]&},​​MeshStyleDirective[Thick,Yellow],​​PlotPoints50
Out[]=
Similarly, the second plot shows a yellow contour traverses the regions of color corresponding to π/2 or -π/2 according to the legend. z 
z-3I
z(z+1)
maps every point on this curve to some imaginary number.
In[]:=
ComplexPlot
(z-3I)
z*(z+1)
,{z,-4-2I,3+5I},​​PlotLegendsAutomatic,​​Mesh{{0},{0}},​​MeshFunctions{Re[#2]&,Re[#2]&},​​MeshStyleDirective[Thick,Yellow],​​PlotPoints50
Out[]=
The algebra part can be
In[]:=
expr=
(z-3I)
z*(z+1)
/.za+b*I
Out[]=
-3+a+b
(a+b)(1+a+b)
Symbolically extract real and imaginary part assuming all variables are real
In[]:=
{re,im}=ComplexExpand[ReIm[expr]]
Out[]=

2
a
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
+
3
a
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
-
3b
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
-
6ab
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
+
2
b
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
+
a
2
b
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
,-
3a
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
-
3
2
a
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
-
2
a
b
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
+
3
2
b
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)
-
3
b
(
2
a
+
2
b
)(
2
(1+a)
+
2
b
)

We only need the numerator of each part because we are only interested in when they are zero.
In[]:=
Together[re]//Numerator
Out[]=
2
a
+
3
a
-3b-6ab+
2
b
+a
2
b
In[]:=
Together[im]//Numerator
Out[]=
-3a-3
2
a
-
2
a
b+3
2
b
-
3
b
Choose a or b with less power. Though WL has no problem to solve the third degree polynomial equation, it is way easier to understand the solution with quadratic equation
◼
  • Find z = a + b * to some real number under transformation. We need image to have zero imaginary part
  • In[]:=
    Solve[-3a-3
    2
    a
    -
    2
    a
    b+3
    2
    b
    -
    3
    b
    0,a]
    Out[]=
    a
    -3-
    9+36
    2
    b
    -4
    4
    b
    2(3+b)
    ,a
    -3+
    9+36
    2
    b
    -4
    4
    b
    2(3+b)
    
    In[]:=
    ContourPlot[-3a-3
    2
    a
    -
    2
    a
    b+3
    2
    b
    -
    3
    b
    0,{a,-5,5},{b,-5,5}]
    Out[]=
    ◼
  • Find z = a + b * to some imaginary number under transformation. We need image to have zero real part
  • In[]:=
    Solve[
    2
    a
    +
    3
    a
    -3b-6ab+
    2
    b
    +a
    2
    b
    0,b]
    Out[]=
    b
    3+6a-
    9+36a+32
    2
    a
    -8
    3
    a
    -4
    4
    a
    2(1+a)
    ,b
    3+6a+
    9+36a+32
    2
    a
    -8
    3
    a
    -4
    4
    a
    2(1+a)
    
    In[]:=
    ContourPlot[
    2
    a
    +
    3
    a
    -3b-6ab+
    2
    b
    +a
    2
    b
    0,{a,-5,5},{b,-5,5}]
    Out[]=
    The plots above should be the same as the meshes from complex plot at the beginning.