How can the x,y position (actually will need in 3d but for simplicity asking in 2d) of a point be found if it is the intersection of two perpendicular line segments.
I have two points, $p_1$ and $p_2$ that are known $x,y$ locations. I also have line segments with known lengths $a$ and $b$. I made a diagram below to illustrate the problem.



If you draw a circle with diameter $\sqrt{a^2+b^2}$ then $p_3$ can be either of two points on that circle.
In two dimensions...
Let $\vec i$ be the unit vector in the direction of the vector $\overrightarrow{p_1p_2}=\dfrac{p_2-p_1}{|p_2-p_1|}$ Let $\vec j$ be a unit vector perpendicular to $\vec i$. (If $\vec i = \langle u,v\rangle$, then, for example, $\vec j = \langle-v, u\rangle$.) Then
$$\overrightarrow{p_1p_3} = \dfrac{a^2}{\sqrt{a^2+b^2}} \ \vec i \pm \dfrac{ab}{\sqrt{a^2+b^2}} \ \vec j$$
See here for details.
In three dimesions, there will be a circle of possible points.
$$\overrightarrow{p_1p_3} = \dfrac{a^2}{\sqrt{a^2+b^2}} \ \vec i + \dfrac{ab}{\sqrt{a^2+b^2}}\cos(\theta) \ \vec j + \dfrac{ab}{\sqrt{a^2+b^2}}\sin(\theta) \ \vec k$$