The condition that the straight lines x=a1y+b1; z=c1y+d1and x=a2y+b2; z=c2y+d2 are perpendicular, is
a1a2+c1c2=1
a1a2+c1c2=-1
a1a2+c1c2=2
a1a2+c1c2=0
The given lines rewrite in symmetric form as x−b1a1=y=z−d1c1 and x−b2a2=y=z−d2c2
The above two lines are perpendicular,
hence a1a2+1+c1c2=0