The length of tangents drawn from an external point to a circle are equal.
Mark points F and E as shown in figure.
So, BF=BD=9 cm,CD=CE=3 cm,AF=AE=x (Assume)
Applying Pythagoras theorem in
△ABC, we get,
AB2 = BC2+CA2
(AF+BF)2 = (BD+DC)2 + (CE+AE)2
(x+9)2 = (9+3)2 + (3+x)2
(x+9)2 = 122 + (3+x)2
x2+18x+81=144+9+6x+x2
12x=72
x=6 cm
∴AB=AF+BF=6+9=15 cm
and AC=AE+CE=6+3=9 cm
Hence, the lengths of AB and AC are 15 cm and 9 cm respectively