Step 1:
$P$ represents the variable complex number z.
Let $z=x+iy$
$Re\bigg(\large\frac{z-1}{z+i}\bigg)$$=1$
$Re\bigg(\large\frac{x+iy-1}{x+iy+i}\bigg)$$=1$
$Re\bigg(\large\frac{x-1+iy}{x+i(y+1)}\bigg)$$=1$
Step 2:
$\bigg(\large\frac{x-1+iy}{x+i(y+1)}\bigg)=\bigg(\large\frac{(x-1)+iy}{x+i(y+1)}\bigg)\times\bigg( \large\frac{x-i(y+1)}{x-i(y+1)}\bigg)$
$\qquad\qquad\;\;\;\;\;\;=\bigg(\large\frac{(x-1)x+y(y+1)+i(xy-(x-1)(y+1)}{x^2+(y+1)^2}\bigg)$
Step 3:
The real part of the expression is equal to 1
Therefore $\large\frac{(x-1)x+y(y+1)}{x^2+(y+1)^2}$$=1$
$x^2-x+y^2+y=x^2+y^2+2y+1$
$x+y+1=0$
The locus is a straight line.