It is given that points A = (−2, 1) B = (4, −1) form a segment, and it is asked at which point in y axis (when x = 0) when you "look at" or draw segments to points A and B there is a 90 degree angle. How do you solve this? The answer is 0,3 and 0,-3 but I cant understand how to find them.
I added a picture, it is known that x = 0, and is asked y coordinate, and the angle between red lines is 90. what is the coordinate of point c?

One way to do it, might not be the best way, using the fact that the product of the slope of perpendicular line is $-1$.
Let $A(-2,1)$, $B(4,-1)$ and $C(0,c)$ be three points. First, the slope of the line between $A$ and $C$ is $$m_1=\frac{c-1}{0-(-2)} = \frac{c-1}{2}$$ Second, the slope of the line between $B$ and $C$ is $$m_2=\frac{c-(-1)}{0-4} = \frac{c+1}{-4}$$ The product of the slopes must be $-1$ $$m_1\times m_2=\frac{c-1}{2}\times\frac{c+1}{-4} = \frac{c^2-1}{-8} = -1$$ This gives a quadratic equation $$c^2-1=8$$ which gives $$c=\pm3$$