Question 1029281
I assume you mean the length of the hypotenuse is {{{sqrt(40)}}}.
Using the Pythagorean theorem,
{{{x^2+(3x)^2=(sqrt(40))^2}}}
{{{x^2+9x^2=40}}}
{{{10x^2=40}}}
{{{x^2=4}}}
{{{x=2}}}
So then the legs are {{{2}}} and {{{6}}} inches.