Explanation:
Let's start by assigning variables to the lengths of the legs of the triangle. Let x be the length of the longest leg, y be the length of the leg in between, and z be the length of the shortest leg.
From the problem statement, we can write two equations:
z = x - 4 (since the shortest leg is 4 cm less than the longest leg)
y = x - 2 (since the leg in between is 2 less than the longest leg)
We also know that the perimeter of the triangle is 24, so we can write a third equation:
x + y + z = 24
We can substitute the expressions for z and y in terms of x into the third equation to get:
x + (x - 2) + (x - 4) = 24
Simplifying this equation gives:
3x - 6 = 24
Adding 6 to both sides gives:
3x = 30
Dividing both sides by 3 gives:
x = 10
So the longest leg of the triangle is 10 cm. Using equations 1 and 2, we can find the lengths of the other two legs:
z = x - 4 = 10 - 4 = 6
y = x - 2 = 10 - 2 = 8
Therefore, the lengths of the three legs are 6 cm, 8 cm, and 10 cm.