Let the foot of the perpendicular dropped from Q be H.
In triangle HQR, we have a Pythagorean triple: 15-20-25. (like 3-4-5 but you multiply each side by 5), so QH = 15.
Next, in triangle PQH, we have another Pythagorean triple, 8-15-17. So, we have PQ = 17.
The perimeter is PQ + QR + PR = 17 + 25 + 28 = 70.