Determine the value of x. Round your answer to the nearest whole number, if necessary.

By definition:
cos(angle) = adjacent/hypotenuse
In triangle ABD:
cos(∠A) = 10/x
In triangle ABC:
cos(∠A) = x/40
Then,
[tex]\begin{gathered} \frac{10}{x}=\frac{x}{40} \\ 10\cdot40=x\cdot x \\ 400=x^2 \\ \sqrt[]{400}=x \\ 20=x \end{gathered}[/tex]