Whenever I run against an indeterminate funtion on the RHS like Tan(pi/2), I prefer to skirt around the problem by resorting to the cosine function(or some other convenient one) instead.
In the present case we have
arctan((y - 1)/x)=pi/2
taking cosines of the tems in the lhs and rhs we get
cos(arctan((y - 1)/x))=0
If we construct a right angled triangle with the perpendicular =(y-1) and base=x, and we take the acute angle arctan((y - 1)/x) as theta, we can see that the hypoteneuse is sqrt(x^2+y^2-2y+1), giving us the values of cos(theta) and sin(theta) as {x/sqrt(x^2+y^2-2y+1)} and {(y-1)/sqrt(x^2+y^2-2y+1)} respectively.
we just need to put cos(theta) = 0 or sin(theta) =1, whichever gives a convenient hold on the problem, and proceed from there.
Here I took the sin(theta) route, which yields:-
y^2+1-2y=x^2+y^2-2y+1
x^2=0, which at least algebraically brings me close to the result. I then figure out the limiting conditions by graphing, and trying out values for y>0, y<0, y=0 etc