Let P=(x,y,z). The three planes are π1:x+y+z=0, π2:lx−nz=0, and π3:x−2y+z=0.
The squared distances from P to these planes are d12=3(x+y+z)2, d22=l2+n2(lx−nz)2, and d32=6(x−2y+z)2.
The condition d12+d22+d32=9 must give the locus x2+y2+z2=9, so the left side must be identically equal to x2+y2+z2.
Expanding the sum of the first and third terms: 3(x+y+z)2+6(x−2y+z)2. Computing the numerator over the common denominator 6: 62(x+y+z)2+(x−2y+z)2.
Expanding: 2(x+y+z)2=2x2+2y2+2z2+4xy+4yz+4xz and (x−2y+z)2=x2+4y2+z2−4xy−4yz+2xz. Their sum is 3x2+6y2+3z2+6xz=3(x+z)2+6y2.
So the sum of the first and third terms is 2(x+z)2+2y2. For the identity to hold, the second term must supply the remainder: l2+n2(lx−nz)2=x2+y2+z2−2(x+z)2+2y2=22x2+2y2+2z2−x2−2xz−z2−2y2=2x2−2xz+z2=2(x−z)2.
Comparing l2+n2(lx−nz)2=2(x−z)2 as an identity in x and z, equating the coefficient of x2: l2+n2l2=21, so l2=n2. Equating the coefficient of xz: l2+n2−2ln=2−2=−1, so 2ln=l2+n2. Since l2=n2, this gives 2ln=2l2, hence n=l.
Therefore l−n=0.