Question 887082
Use the distance formula,
{{{D^2=(x[2]-x[1])^2+(y[2]-y[1])^2}}}
.
.
.
Distance from P to x-axis:
{{{D[1]^2=(6-x)^2+(p-0)^2=(6-x)^2+p^2}}}
Distance from P to Q:
{{{D[2]^2=(6-6)^2+(p-3)^2=(p-3)^2}}}
Set the two distances equal to each other,
{{{(6-x)^2+p^2=(p-3)^2}}}
{{{(6-x)^2+p^2=p^2-6p+9}}}
{{{-6p+9=(6-x)^2}}}
{{{-6p=(6-x)^2-9}}}
{{{highlight(p=-(1/6)(6-x)^2+3/2)}}}