#### Answer

$h = \frac{P^2}{2P+24}$

#### Work Step by Step

Let the three sides of the triangle be $a,b,$ and $h$
Note that: $~~a^2+b^2 = h^2$
We can write two expressions for the area:
$A = \frac{1}{2}(12)(h) = \frac{1}{2}ab$
Then: $ab = 12h$
We can express the length of the hypotenuse $h$ as a function of the perimeter $P$:
$a+b+h = P$
$a+b = P-h$
$(a+b)^2 = (P-h)^2$
$a^2+2ab+b^2 = P^2-2Ph+h^2$
$2ab = P^2-2Ph$
$2(12h) = P^2-2Ph$
$24h = P^2-2Ph$
$24h+2Ph = P^2$
$h(24+2P) = P^2$
$h = \frac{P^2}{2P+24}$