In this case, we can identify two similar triangles like this:
We can formulate the following ratios between the sides of the two triangles:
![(b2)/(b1)=(h2)/(h1)](https://img.qammunity.org/2023/formulas/mathematics/college/yfb06igexqc3jqn4nlleh0q1rftaarqjxm.png)
Where b1 and h1 are the base and height of the larger triangle (blue) and b2 and h2 are the base and height of the smaller triangle (red). By replacing 16 for b2, 20 for b1 (16 + 4), w for h2 and 12 for h1 we get:
![(16)/(20)=(w)/(12)](https://img.qammunity.org/2023/formulas/mathematics/college/y4ht1kh3wbgskefwwalhi68nmtvpqgtlu8.png)
From this equation, we can solve for w, to get:
![\begin{gathered} (16)/(20)=(w)/(12) \\ (16)/(20)*12=(w)/(12)*12 \\ (16*12)/(20)=w \\ 9.6=w \\ w=9.6 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/cicbpk7nqfdg3w0xybhuuvld47ro38l7rp.png)
Then, the length of w is 9.6 cm