so, as you can see from the picture below
the line coming down from the right-angle, creates 3 similar triangles
a large, a medium and a small one
the large one, is the one containing the other two smaller ones... anyhow
to get "x", you can use proportions, either from large and medium or small and large so [tex]\bf \cfrac{large}{medium}\qquad \cfrac{15}{12}=\cfrac{9}{x}\qquad \qquad \cfrac{small}{large}\qquad \cfrac{9}{15}=\cfrac{x}{12}[/tex]
solve for "x", either proportion will do