Since segment AB is tangent to the circle this means that angle ABC is a right angle, which in turns means that triangle ABC is a right triangle and then we can apply the pythagorean theorem:
where c is the hypotenuse, and a and b are the legs. In this case the hypotenuse has a length of r+8 and the legs have length r and 12. Plugging this in the theorem and solving for r we have:
Therefore, the value of r is 5