Let point O be the center of the circle, M the midpoint of line segment AB, and N the midpoint of CD (the point of tangency). Draw the line segment MN; O will lie on this line. Let us define s as the length of the sides of the square, and r as the radius of the circle. Then the length of MN is s, and the lengths of AO, BO, and NO are all r.
Now, define x to be the length of MO. Thus as MO+NO=MN, x=s-r. However, looking at the right triangle AMO, we see
Substituting in x=s-r:
Now, note that the length of the portion of AD (or BC) inside the circle is 2x, and thus the portion outside is s-2x. The result above then gives them to be , , for the 3:1 ratio you observed in your drawing.