Answer:
<em>Shorter leg=3</em>
<em>Longer leg=4</em>
Step-by-step explanation:
<u>Equations</u>
In a right triangle, Pythagora's Theorem is satisfied. Being a the hypotenuse, b and c the legs of the triangle, then:

Let's call
x=the shorter leg of the triangle
The longer leg is 1 cm longer than the shorter leg, thus:
x+1=the longer leg.
Since the hypotenuse is 5 cm long:

Operating:

Swapping sides and simplifying:

Subtracting 25:

Dividing by 2:

Factoring:

We have two possible solutions:
x=3, x=4
The longer leg is x+1.
If x=3, x+1=4
If x=4, x+1=5. This solution is not valid because one leg would be equal to the hypotenuse.
Thus, the solution is:
Shorter leg=3
Longer leg=4