If P is the midpoint of the segment between the axes, them point A(2,0) and B(0,4).
The equation of the line is, 2x+4y=1
or, 2x+y=4…(1)
The line perpendicular to it is of form, x−2y=k
Since it passes through (−2,1),
−2−2=k⇒k=−4
∴ Line is, x−2y=−4…(2)
Solving (1) and (2) we get (54,512).