Two vertical poles respectively 1 meter and 9 meters high are 6 meters apart. How far from the foot of the shorter pole where the line segment joining the tops of the poles subtends the greatest

angle? (please show the compution)

Mark a point P which is x meters from the shorter pole.

Draw the lines from P to the tops of the poles.
Now you have three angles, A,B,C, and you want to know where P must be so that angle B is a maximum.
A+B+C = π
so
B = π - (A+C)
tanB = -tan(A+C) = (tanA+tanC)/(tanA tanC - 1)
tanB = (1/x + 9/(6-x))/((1/x)(9/(6-x))-1) = (8x+6)/(x-3)^2
sec^2B dB/dx = -4(2x+9)/(x-3)^3
dB/dx = -4(2x+9)/(x-3)^3 * 1/(1+((8x+6)/(x-3)^2)^2)
dB/dx = -4(2x+9)(x-3)^2 / (x^2+1)(x^2-12x+117)
As expected, P is halfway between the feet of the two poles, at x=3.