Let angle BAC = 2β and angle CBA = 2α
By law of cosine,
BC^2 = AC^2 + AB^2 - 2(AC)(AB)cos(2β)
6^2 = 7^2 + 9^2 - 2(7)(9)cos(2β)
β= 20.87 degree
By law of cosine,
AC^2 = BC^2 + AC^2 - 2(BC)(AC)cos(2α)
7^2 = 6^2 + 9^2 - 2(6)(9)cos(2α)
α= 25.49 degree
Let O be the centre of the circle.
tan(β) = OP / AP ... (1)
tan((180-2α)/2) = OP / PB ... (2)
(1) / (2)
tan(β) / tan((180-2α)/2) = PB / AP
tan(20.87) / tan((180-2x25.49)/2) = (AP - 9) / AP
tan(20.87) / tan((180-2x25.49)/2) = (1 - 9/AP)
AP = 9/(1 - tan(20.87) / tan((180-2x25.49)/2) )