Answer:
8 cm and 15 cm.
Explanation:
Let x and y represent length of each leg of right triangle.
We have been given that the perimeter of a right triangle is 40 cm, and its hypotenuse measures 17 cm.
We can represent this information in a system of equations as:
![x+y+17=40...(1)](https://img.qammunity.org/2020/formulas/mathematics/middle-school/l7stu1rywd3zl4gv1zy50wdf3kpkni61m9.png)
From equation (1), we will get:
![x+y+17-17=40-17](https://img.qammunity.org/2020/formulas/mathematics/middle-school/crep2l2l3affza4944fv8iqhg4basn5nov.png)
![x+y=23](https://img.qammunity.org/2020/formulas/mathematics/middle-school/mup0r4wbp6pp158hac6ravlxo971u4l7kw.png)
![x=23-y](https://img.qammunity.org/2020/formulas/mathematics/middle-school/p5xeepelqqtsiz6wag5kz2s0ycsd00eu7i.png)
Substitute this value in equation (2):
![(23-y)^2+y^2=17^2](https://img.qammunity.org/2020/formulas/mathematics/middle-school/nukgojhak6sd2k8f1c2df2utfnkhhbndw8.png)
![529-46y+2y^2=289](https://img.qammunity.org/2020/formulas/mathematics/middle-school/osc1fel1l67337mhe31fhqly94amb6jpbe.png)
![2y^2-46y+529=289](https://img.qammunity.org/2020/formulas/mathematics/middle-school/v8y6p68qvvgpjp1okhkghbm5hvrzd207el.png)
![2y^2-46y+240=0](https://img.qammunity.org/2020/formulas/mathematics/middle-school/jn4cqcj6kn8534sgtgrozhts7izdlenqp7.png)
![y^2-23y+120=0](https://img.qammunity.org/2020/formulas/mathematics/middle-school/a0y2tq18ye2gyvz0ey0u9v9yz0np1gu20k.png)
![y^2-15y-8y+120=0](https://img.qammunity.org/2020/formulas/mathematics/middle-school/ine8z63lnb2csgu29sr955rs31jtjndtrw.png)
![y(y-15)-8(y-15)=0](https://img.qammunity.org/2020/formulas/mathematics/middle-school/7u8sm8vjos1qtrbnmqienfqjv10gbltb9k.png)
![(y-15)(y-8)=0](https://img.qammunity.org/2020/formulas/mathematics/middle-school/v5p01930fujwum61osw5qxbikz9el0n3pm.png)
![y=15\text{ (or) }y=8](https://img.qammunity.org/2020/formulas/mathematics/middle-school/66jx53tnl6tqt0atkbj3vw1xooqwrqycur.png)
Therefore, the length of the legs of the hypotenuse would be 8 cm and 15 feet.