By definition:
cos(angle) = adjacent/hypotenuse
In triangle ABD:
cos(∠A) = 10/x
In triangle ABC:
cos(∠A) = x/40
Then,
4.5m questions
5.9m answers