Perhaps, (not sure if this works, I haven't checked it), make P point (x,y), then somehow you need to find the eqn of circle, so you need centre and radius of circle to be known. So an idea I have (like I said, I don't know if this works, I haven't tried it!) find length AB, midpoint should be...