If $$ax^2+2hxy+by^2+2gx+2fy+c=0,$$ represents a pair of lines, show that the square of the distance from origin to their point of intersection is $$\frac{c(a+b)-f^2-g^2}{ab-h^2}.$$
My attempts; since the given equation represents a pair of straight lines, let each be $$l_1x+m_1y+n_1=0$$ and $$l_2x+m_2y+n_2=0.$$ Now comparing the combined equation of these two lines with the given equation I got: $$l_1l_2=a$$ $$m_1m_2=b$$ $$n_1n_2=c$$ $$l_1m_2 + l_2m_1=2h$$ $$l_1n_2 +l_2n_1=2g$$ $$m_1n_2+ m_2n_1=2f.$$ Now how should I complete?