Check the picture below.
so the chord we see in the picture in "green", has a length of XQ + QY, now, we can just use the pythagorean theorem to get the length of XQ, keeping in mind that the point of tangency at Q is always a right-angle, and thus that means that XQ = QY, so whatever the green chord is, is just really 2 * XQ.