Question 1046270
Let the origin be point O. 

Let the points R and S be where the line M perpendicular to line OP and passing through P intersect the two lines.  (Note that line OP actually bisects the angle between the pair of lines.) 

Let the point S be (x,y), and let G be such that the segment PG is perpendicular to line OS.

Then by similarity of triangles, 

{{{abs(PS)/abs(PG) = abs(OS)/abs(OP) }}}

===> {{{ ( abs(hy-kx) /sqrt(h^2+k^2))/d = sqrt(x^2+y^2)/sqrt(h^2+k^2)}}}

===> {{{  abs(hy-kx) /(d*sqrt(h^2+k^2)) = sqrt(x^2+y^2)/sqrt(h^2+k^2)}}}

===> {{{  abs(hy-kx) /d = sqrt(x^2+y^2)}}}

===> {{{  abs(hy-kx) =d*sqrt(x^2+y^2)}}}

<===>  {{{  abs(hy-kx)^2 =d^2*(x^2+y^2)}}}, or equivalently,

 {{{  (hy-kx)^2 =d^2*(x^2+y^2)}}}

and this finishes the solution.