Let the total distance from the second observation point to the base of the object be x, making the height h = x * tan(beta) and also h = (x + d) * tan(alpha). Equating the two expressions for x gives h / tan(beta) = h / tan(alpha) + d. Rewriting the tangents as cotangents yields h * cot(beta) - h * cot(alpha) = d. Factoring out h gives h times the quantity (cot(beta) - cot(alpha)) equals d, so solving for h gives d divided by (cot(beta) - cot(alpha)). To match the given form, multiply the numerator and denominator by negative one to get d / (cot(alpha) - cot(beta)). The result is d / (cot(alpha) - cot(beta)).