What does it mean to take the ratio of two equations? 
The line joining the origin and the point of intersection of the curves $ax^2+2hxy+by^2+2gx=0$ and $a_1x^2+2h_1xy+b_1y^2+2g_1x=0$ will be mutally perpendicular if $g(a_1+b_1)=g_1(a+b)$

This is solved in my reference as
$$
ax^2+2hxy+by^2=-2gx\\
a_1x^2+2h_1xy+b_1y^2=-2g_1x\\
\color{red}{\frac{ax^2+2hxy+by^2}{a_1x^2+2h_1xy+b_1y^2}=\frac{g}{g_1}}\\
x^2(ag_1-a_1g)+2xy(hg_1-h_1g)+y^2(bg_1-b_1g)=0\\
\text{lines are perpendicular }\implies ag_1-a_1g+bg_1-b_1g=0\\
(a+b)g_1=(a_1+b_1)g
$$
Mathematical steps are fine but I really do not understand the logic behind it, particularly the first two steps where we take the ratio of the two equations of the given curves ?
Intuition
Say, we have two lines $x+y=1$ and $x-y=-2$, we can solve it by substituting $y=x+2$ in $x+y=1\implies x+y=x+x+2=2x+2=2(x+1)=1\implies x=\dfrac{1}{2}-1=\dfrac{-1}{2}\implies y=\dfrac{3}{2}$.
But, If I do
$$
y=1-x\quad;\quad y=x+2\\
1=\frac{-x+1}{x+2}\implies x+2=-x+1\implies2x=-1\implies x=-1/2\\
y=3/2
$$
So what does it mean to take the ratio of two equations ?

The condition to be deduced involves the ratio $g/g_1.$ The equations each have the same multiple of $g$ and $g_1$ on their RHSs. Thus, taking their ratio begins to get one in the direction wanted.
