We want to estimate the height of an object just by choosing an appropriate angle of elevation.
In order to change the measure of the angle of elevation, you need to move closer or farther from the object.
Notice that a right triangle is formed between your position and the object. Then, if you pick an angle of elevation of 45^(∘), you will get a 45^(∘)-45^(∘)-90^(∘) triangle which means it is isosceles.
Consequently, the height of the object is equal to the horizontal distance from your position to the object's position.