Draw a line parallel to AB through R
Let PE be the altitude of triangle APB
Extend this altitude to intersect the line we have constructed at F
APB is a right triangle because 8^2 + 4^2 = 80 = 4sqrt (5)
Now the area of APB = (1/2)(4)(8) = 16
To find PE
[APB ] = (1/2) sqrt (80) *PE
16 =(1/2) sqrt (80) * PE
32 / sqrt (80) = PE = 32 / [ 4sqrt5 ] = 8/sqrt5
We can find EB as sqrt ( PB^2 - PE^2) = sqrt ( 4^2 - 64/5 ) = sqrt (16/5) = 4/sqrt5
And triangle RDC is congruent to triangle APB
Let its altitude = RG = 8/sqrt5
And, by symmetry, DG = 4/sqrt5
We can now form right triangle PFR with PR the hypotenuse
PF = PE + BC + RG = 2(8/sqrt5) + 4sqrt (5) = 16/sqrt 5 + 4*5/sqrt 5 = 36/sqrt 5
And FR = AB - EB - DG = 4sqrt 5 - 2(4/sqrt5) = 4*5 /sqrt 5 - 8/sqrt 5 = 12/sqrt 5
So
PR^2 = PF^2 + FR^2
PR^2 = 1296/5 + 144/5 = 1440 / 5
PR = sqrt (1440/5) = sqrt (288) = 12sqrt2