SOLID GEOMETRY: fly stationed at a point on the circumference of the base of a cylindrical tower

a fly stationed at a point on the circumference of the base of a cylindrical tower of radius 12 feet. Find that he can just see a distant flagstaff by walking along the tangent line to the base either a distance 8 feet in one direction or a distance 5 feet in the other direction. Find the distance of the foot of the flagstaff from the center of the base of the tower