Show that the lines joining the origin to the points of intersection of two curves $ax^2+2hxy+by^2+2gx=0$ and $a_1x^2+2h_1xy+b_1y^2+2g_1x=0$ will be at right angles to one another if $g(a_1+b_1)=g_1(a+b)$.
My approach:
$$\begin{eqnarray} \tag {1} ax^2+2hxy+by^2+2gx=0 \\ \tag {2} a_1x^2+2h_1xy+b_1y^2+2g_1x=0 \end{eqnarray}$$
From equation (2),
$$2x=\frac {a_1x^2+2h_1xy+b_1y^2}{g_1}$$
I could not move on from here. Please help me to continue.
You need first to eliminate the $x$ term from the equations, so that the equation is homogeneous. Multiply the first equation by $g_1$ and the second equation by $g$ and subtract.
You then have $$x^2(g_1a-ga_1)+2xy(g_1h-gh_1)+y^2(g_1b-gb_1)=0$$
The gradient from the origin to $(x,y)$ is $\frac yx=m$ so we divide by $x^2$ and write this equation as a quadratic in $m$.
For the perpendicularity condition we require the product of the roots to be $-1$, so putting that in terms of the coefficients, we get $$\frac{g_1a-ga_1}{g_1b-gb_1}=-1$$
This leads immediately to the result you are looking for.
I hope this helps