so hmm check the picture below
notice, dropping a perpendicular line to the opposite side, of the right-angle, gives three similar triangles, a small, a medium, and the large one containing the other two
now, let's use the medium and small triangles then, with proportions
[tex]\bf \cfrac{medium}{small}\qquad \cfrac{12}{x}=\cfrac{16}{12}[/tex]
solve for "x"