Let the pole heights be a and b, and let P be at distances x and y from their respective bases. Since the angle of elevation to both tops is 45 degrees, tan 45 equals 1, meaning x equals a and y equals b. The poles are vertical and on opposite sides of P, so the horizontal distance between their tops is a plus b. Using the Pythagorean theorem, the square of the distance between the tops is (a plus b) squared plus (a minus b) squared. Expanding both squares gives a squared plus 2ab plus b squared plus a squared minus 2ab plus b squared, which simplifies to 2(a squared plus b squared).