a)
For this part, just look at triangle ABC and ignore triangle ACD,
AB and BC form the right angle, so they are legs.
AC is opposite the right angle, so it is the hypotenuse.
Use the Pythagorean theorem.
(AB)^2 + (BC)^2 = (AC)^2
(12 cm)^2 + (5 cm)^2 = (AC)^2
144 cm^2 + 25 cm^2 = (AC)^2
(AC)^2 = 169 cm^2
AC = 13 cm
b) Now we look at triangle ACD.
Angle ACD is the right angle.
The legs measure 13 cm and 5 cm.
We need AD, the length of the hypotenuse.
(AC)^2 + (DC)^2 = (AD)^2
(13 cm)^2 + (5 cm)^2 = (AD)^2
169 cm^2 + 25 cm^2 = (AD)^2
(AD)^2 = 194 cm^2
AD = sqrt(194 cm^2)
AD = sqrt(194) cm