The situation described will give the figure of a right triangle with the vertical line measuring 16 feet, the horizontal line measuring 12 feet, and the hypotenuse (or the diagonal line) of unknown length.
Take note that the two perpendicular sides measuring 12 and 16 can be reduced to 3 and 4 (by dividing both numbers by their common factor 4). A right triangle with 2 of the perpendicular sides given in the ratio of 3:4 will always have a hypotenuse of 5. This suggests that the right triangle is a special 3-4-5 or 3:4:5 triangle.
The hypotenuse, then, is: h/12 = 5/3
h = 12(5/3) = 60/3 = 20
The result will be the same using: h/16 = 5/4
h = 16(5/4) = 80/4 = 20
TIP: When you see a right-triangle type of problem, check first if it can be solved using the many special properties of right triangles. It simplifies computation.