It will be difficult, if not impossible, to solve this problem without drawing a figure.
When you do you should pretty quickly see that one of the legs of right triangle is 12+r and the other is 5+r.
Then you have (5+r)2 + (12+r)2 = (5+12)2 = 289.
Expand and collect terms and you will have a quadratic equation is r.
Solve the quadratic and you will be able to compute the perimeter.
Paul M.
05/18/19
Bob G.
Thanks A Lotttttttttt!05/18/19