1. Are the two circles tangent to each other?
2. Is the line passing from P between the two circles a tangent to both circles?
If and only if the answer to both questions is yes then all three tangent segments have the same length. Use Pythagorean theorem to calculate the distance PO.