Answer:
First piece: 4 inches
Second piece: 16 inches
Third piece: 20 inches
Explanation:
Let's say the length of the first piece is x inches.
The second piece is 4 times as long as the first piece, so its length is 4x inches.
The third piece is 5 times as long as the first piece, so its length is 5x inches.
Together, the three pieces must have a total length of 40 inches.
So we have the equation:

Combining like terms, we get:
10x = 40
Dividing both sides by 10, we get:


Therefore, the lengths of the three pieces are:
First piece: x = 4 inches
Second piece: 4x = 4 × 4 = 16 inches
Third piece: 5x = 5 × 4 = 20 inches