Let the sides of the triangle be a, b, and c, with c as the hypotenuse. So we need area of rectangle (36x45) to be equal to the area of the triangle a*b/2. And we need a2 + b2 = c2, with all three as integers. It's this second part, specifically the fact that c must be an integer, that narrows down the possibilities. So,
ab/2 = 36*45
ab = 3240 = 23*34*5
There are 20 unique solutions to a*b=3240, so testing possibilities is an option. I'd prefer to do number theory, but the only obvious insight I get from number theory is that one of a or b must be divisible by 8. So that limits our possibilities to 10. Testing those in excel, I get that 120*27 = 3240 and 1202 + 272 = 1232 as the only solution. Therefore, the perimeter is 120+27+123 = 270.