step 1
In the right triangle BDC
Applying Pythagorean Theorem
BC^2=BD^2+DC^2
substitute given value
BC^2=BD^2+10^2 -----> equation 1
step 2
In the right triangle ABD
Applying Pythagorean Theorem
AB^2=BD^2+AD^2
AB^2=BD^2+8^2
AB^2=BD^2+64 -----> equation 2
step 3
In the right triangle ABC
AC^2=AB^2+BC^2
18^2=AB^2+BC^2 ------> equation 3
substitute equation 1 and equation 2 in equation 3
so
18^2=(BD^2+64)+(BD^2+100)
solve for BD
324=2BD^2+164
2BD^2=324-164
2BD^2=160
BD^2=80
Find the value of AB
Remember equation 2
AB^2=BD^2+64
substitute
AB^2=80+64
AB^2=144
therefore
AB=12 units