Because point p is where it is,
Pr+pq has value.
Then we will find the limit case, which makes point P and point C coincide.
Therefore, it is concluded that PR is the height on the hypotenuse of Rt△BCD.
30*40=50*PR
PR=24
PR+PQ=24