Let P be ( x,y).
Distance from P to line y - 2x = 0 is
( y - 2x)/sqrt(1 + 2^2) = (y -2x)/sqrt 5 = PM.
Distance from P to x - axis = y.
since PM^2 =5PN^2,
that is (y-2x)^2/5 = y^2
y^2 + 4x^2 - 4xy = 5y^2
4x^2 - 4y^2 - 4xy = 0
x^2 - y^2 - xy = 0 is the locus of P.