AB=r1, AC=r2, AD=r3
Using parametric form of line, we get
B≡(5+r1cosθ,4+r1sinθ)
It lie on line x+3y+2=0
AB=r1=∣∣∣−5−12+2cosθ+3sinθ∣∣∣=15cosθ+3sinθ
Similarly,
r2=102cosθ+sinθ & r3=6cosθ−sinθ
Now,
(15AB)2+(10AC)2=(6AD)2
(cosθ+3sinθ)2+(2cosθ+sinθ)2=(cosθ−sinθ)2
⇒4cos2θ+9sin2θ+12sinθcosθ=0
⇒(2cosθ+3sinθ)3=0
⇒tanθ=−23
Equation of line through A is (y+4)=−23(x+5)
⇒2x+3y+22=0
⇒l=2,m=3,n=22
n−m−l=22−2−3=17