need help on solving problems with comon tangents

First, find angle ECD using tan^-1(6/4), we get angle as 56.31
Now by proportionate, angle ECD and angle EBA are equal.
Hence you can use tan to find AB i.e, AB = 18/tan(56.31)= 12
Therefore, AB = 12