this is a nice problem with a few repetitive steps.
My first step would be to find the equation for the line L.
The second step is to find the equation for the line P.
Then find the equation of any line that is perpendicular to L and P.
Find the intersections of this new line with L and with P.
Find the distance between this 2 points.
You are done:)
Can you do that?