To answer this question we will use the Pythagorean theorem.
Let l be the length (in meters) of the longer leg, then the length of the shorter (in meters) leg will be l-1.
Using the Pythagorean theorem we get:
![l^2+(l-1)^2=5^2.](https://img.qammunity.org/2023/formulas/mathematics/high-school/dt9pd78xw4nlh5bljdpneyv64tsbw3o6hq.png)
Simplifying the above result we get:
![l^2+l^2-2l+1=25.](https://img.qammunity.org/2023/formulas/mathematics/high-school/h3kvhromq3hf79mg4t4y74kc3k94o76ejd.png)
Adding like terms we get:
![2l^2-2l+1=25.](https://img.qammunity.org/2023/formulas/mathematics/high-school/wv5ik248hupx3grtmjvi7ja9l7z3754bev.png)
Subtracting 25 from the above equation we get:
![\begin{gathered} 2l^2-2l+1-25=25-25, \\ 2l^2-2l-24=0. \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/vym0pv2vt8vaqzxex6srik0oh29y4bg4h9.png)
Dividing the above equation by 2 we get:
![\begin{gathered} (2l^2-2l-24)/(2)=(0)/(2), \\ l^2-l-12=0. \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/3j94o3tkurbaiv86jofvjxgaruli3ffzjg.png)
Now, notice that:
![\begin{gathered} -1=3-4, \\ -12=3*(-4). \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/w4y6ffhgthdtg5w9dtqfj1wlsps96brxob.png)
Then:
![l^2-l-12=(l+3)(l-4).](https://img.qammunity.org/2023/formulas/mathematics/high-school/gus76sszzoa4jsd58osamrzhmj1rt73dqz.png)
Therefore:
![l^2-l-12=0\text{ if and only if }l=4\text{ or l=-3.}](https://img.qammunity.org/2023/formulas/mathematics/high-school/b7v2vyfh0ne11uabn9lro14x9a3qa7ggzo.png)
Since l is the length of a leg of a right triangle, then l>0, therefore l=4.
Answer:
Length of the shorter leg: 4m.
Length of the longer leg: 3m.
Length of the hypotenuse: 5m.