Explanation:
the formula for the height in a right-angled triangle is
h = sqrt(p×q)
p and q being the segments of the Hypotenuse left and right from the point, where the height intersects with the Hypotenuse.
so, in our case
12 = sqrt(16×(x-16))
let's square this to eliminate the square root :
144 = 16×(x - 16) = 16x - 256
400 = 16x
x = 25