Question 75820
Let c=hypotenuse, a=longer leg, b=other leg

Since the hypotenuse exceeds the longer leg by 2, it is 2 units more than the longer leg. In other words:

{{{c=a+2}}}

Since the perimeter is 40, we can find the other leg by the perimeter formula

{{{P=a+b+c}}} where P is the perimeter and a,b,c, are the sides of the triangle

{{{40=a+b+c}}}
{{{40=a+b+(a+2)}}} Substitute a+2 into c

Since the missing side (b) can be found by Pytagoreans Thereom, we can say

{{{a^2+b^2=c^2}}}
{{{b^2=c^2-a^2}}}
{{{b=sqrt(c^2-a^2)}}} Solve for b
{{{b=sqrt((a+2)^2-a^2)}}} Substitute a+2 into c
{{{b=sqrt(a^2+4a+4-a^2)}}}
{{{b=sqrt(4a+4)}}}

Now plug in {{{sqrt(4a+4)}}} in for b to complete the equation

{{{40=a+sqrt(4a+4)+(a+2)}}}
{{{40=2a+2+sqrt(4a+4)}}}
{{{38-2a=sqrt(4a+4)}}}
{{{(38-2a)^2=(sqrt(4a+4))^2}}} Square both sides
{{{4a^2-156a+1444=4a+4}}}
{{{4a^2-148a+1440=0}}} Get all terms to one side

Now plug your quadratic into the quadratic formula to find a (sorry the solver wouldn't format):

if we use a calculator, we get: 

{{{a=24}}} or {{{a=15}}}

Now lets find c

{{{c=a+2}}}
{{{c=24+2}}} Let a=24
{{{c=26}}}

Since 24+26=50 which is over 40, 24 is not our answer

{{{c=a+2}}}
{{{c=15+2}}} Let a=24
{{{c=17}}}

Now find b

{{{b=sqrt(c^2-a^2)}}}
{{{b=sqrt(17^2-15^2)}}}
{{{b=sqrt(289-225)}}}
{{{b=sqrt(64)}}}
{{{b=8}}}
So the sides are:

a=15,b=8,c=17

<p>
Check:
{{{40=a+b+c}}} Use the perimeter formula to check
{{{40=15+8+17}}} Plug in a=15,b=8,c=17
{{{40=40}}} works