well u no that:
PQ = p
and A lies between P and Q
and PQ X QA = PA^2
therefore since PQ = p and QA = PQ - PA = p - AP
p(p-AP) = PA^2
therefore p^2 - pPA = PA^2
PA^2 + pPA - p^2 = 0
then using quadratic formula solve for PA. u shuld take the positive value only (since it is a distance) and u shuld get (-1 + root5)p/2