For pair of st. lines , length of line joining feet of perpendiculars from $(f,g)$ to them is$\sqrt {4.\frac {(h^2-ab)(f^2+g^2)}{(a-b)^2+4h^2}}$ Consider a pair of straight lines through the origin,
$$ax^2+2hxy+by^2=0$$
This can be written as,
$$y=m_{1,2}x$$
where $m_{1,2}=-\frac {a}{h±\sqrt {h^2-ab}}$. Now, suppose a point $(f,g)$ whence perpendiculars are drawn to both the lines . Then the eqations of the perpendiculars are,
$$y=-\frac {1}{m_{1,2}}x + C_{1,2}$$
where $C_{1,2}=g-\frac {h±\sqrt {h^2-ab}}{a}f$. Finally , we can find the coordinates of the feet of perpendiculars using the formula of intersection coordinates:
$$(x,y)=(\frac {c_1-c_2}{m_2-m_1},\frac {c_1m_2-c_2m_1}{m_2-m_1})$$
Hence using the distance formula, the distance between the feet of perpendiculars is,
$$s=\sqrt {(\frac {C_2m_2}{1+m_2^2}-\frac {C_1m_1}{1+m_1^2})^2+(\frac {C_2m_2}{m_2+\frac {1}{m_2}}-\frac {C_1m_1}{m_1+\frac {1}{m_1}})^2}$$
I am unable to proceed further to get the desired result i.e. $\sqrt {4.\frac {(h^2-ab)(f^2+g^2)}{(a-b)^2+4h^2}}$. Initially I felt the need of simplification, but that too didn't work , when even my simplified expression $s=\sqrt {\frac {(1+m_1^2)(f-gm_2)^2+(1+m_2^2)(f-gm_1)^2-2(f-gm_1)(f-gm_2)(1+m_1m_2)}{(1+m_1^2)(1+m_2^2)}}$ needed a CAS to be rendered in the desired form. Any help is welcome.

Write the lines like $(Ax+By)(A'x+B'y)=AA'x^2+2\frac{AB'+A'B}{2}xy+BB'y^2=0$
Then the system of one line and its perpendicular through $(f,g)$ is $\langle Ax+By,Ay-Bx-Ag+Bf\rangle$ and has solution $(x,y)=(\frac{B}{A^2+B^2}(Bf-Ag),\frac{A}{A^2+B^2}(Ag-Bf))$ and similarly for the primed, which gives the distance $$\sqrt{\frac{(AB'-A'B)^2(f^2+g^2)}{(A^2+B^2)(A'^2+B'^2)}}.$$ Now $h^2-ab=\frac{(AB'-A'B)^2}{4}$ and $(a-b)^2+4h^2=(A^2+B^2)(A'^2+B'^2)$ and were done.
