Answer
12mm, 16mm, and 20mm
Work Step by Step
1st leg: 4 mm longer than the other leg
hypotenuse: 8 mm longer than the 2nd leg
1st leg: 4+x
hypotenuse: 8+x
$(4+x)^2+x^2=(8+x)^2$
$x^2+8x+16+x^2=x^2+16x+64$
$x^2+8x+16=16x+64$
$x^2-8x=48$
$x^2-8x-48=0$
$x^2-12x+4x-48=0$
$x(x-12)+4(x-12)=0$
$(x-12)(x+4)=0$
$x-12=0$
$x=12$
$x+4=0$
$x=-4$ (invalid since we can't have a negative distance)
$4+12=16$
$8+12=20$