this is easy ..
we have from the givn AP
AP-AB=AC-AP thus
BP=PC thus P is the midpoint ..
as P is the mid point OP is perpendicular to AP
let P be h,k
we have equation of line =y(h-x1) - x(k-y1) +kx1 -hy1=0
distance of this line from O=OP =h2 + k2
further this is also = kx1-hy1/√(h-x1)2 + (k-y1)2
thus the result