Here, You need to apply "Proportionality Theorem"
According to this theorem, the ratio of components of a leg would be equal to the ratio of corresponding components of another leg.
In mathematical form,
AB/BD = AC/CD
Substitute their values,
36/24 = x/18
2/3 = x/18
x = 18*3 / 2
x = 54 / 2
x = 27
In short, Your Answer would be 27
Hope this helps!