The given relations are
al+bm+cn=0 and fmn+gnl+hlm=0.
Eliminating n between them, we get
(fm+gl)(−al+bmc)+hlm=0
⇒agl2+(af+bg−ch)lm+bfm2=0.
⇒ag(1m)2+(af+bg−ch)lm+bf=0 ...(1)
Let l1m1,l2m2 be the roots of the above quadratic; then
l1m1.l2m2= product of the roots =bfag=f/ag/b,
i.e., l1l2f/a=m1m2g/b=n1n2h/c by symmetry.
The lines will be perpendicular if l1l2+m1m2+n1n2=0,
i.e., if fa+gb+hc=0.