We want to compare the theorem to the expressions in our figure. In our case, ( w+4) is the length of the altitude, and 6 and 24 are the lengths of the partial segments of the hypotenuse.
CD=sqrt(AD * DB)
⇕ w+4=sqrt(6 * 24)
Now, we can find the value of w.