The Law of Cosines is useful for this. It tells you
b² = a² +c² -2ac×cos(B)
where the length BD is c×cos(B). Solving for BD, we get
(b² -a² -c²)/(-2a) = BD
However, BD = BC +CD = a +CD, so we really want to find
CD = (a² +c² -b²)/(2a) -a
CD = (c² -a² -b²)/(2a)
Substituting the given numbers, we have
CD = (16² -9² -10²)/(2×9) = 75/18 = 25/6
The length CD is 25/6 = 4 1/6.