Pure imaginary complex number

Hello,

How Wolfram can do this problem?
Determine the set of complex numbers z such that (z-3i) / z (z + 1) is pure imaginary and after pure real
Sorry for my English.

Best regards.

Here is one way.

z = a + b I;
f = (z - 3 I)/(z (z + 1)) // ComplexExpand

Now solve for when the real part is zero:

sol = Reduce[Re[f] == 0, {a, b}, Reals]

Here is a contour plot showing some of the solution:

ContourPlot[Re[f] == 0, {a, -5, 5}, {b, -10, 10}, 
  FrameLabel -> (Style[#, Bold, 18] &) /@ {"a", "b"}, PlotPoints -> 100]