# Length of tangent line segment to 2 circles

Since $\triangle ACD$ is a right triangle with $CD=6$, we have $$AB=AC-BC=\sqrt{6^2-4^2}-2=2\sqrt 5-2.$$
You can also use the Tangent-Secant theorem to get $(AB+2)^2=2\dot(2+8)$. Solving this yields $AB=\sqrt{10}-2$.