When two chords intersect the products of the distances from the circumference to the intersection are identical.

This works even if the intersection (M) is outside of the circle.

Try moving the ends of the chords around the circumference and checking it is really true.

(Be very careful to remember that the distances are always "circumference to intersection". It is very easy to forget this when M is outside the circle.)