Final answer:
To find the length of each piece of the sandwich, we assign variables to the second and third pieces. We then set up an equation and solve for the variables. The length of the second piece is 8 inches, the length of the first piece is 24 inches, and the length of the third piece is 13 inches.
Step-by-step explanation:
To solve this problem, let's assign variables to the lengths of the second and third pieces. Let the length of the second piece be x. According to the problem, the first piece is three times as long as the second piece, so its length is 3x. The third piece is 5 inches longer than the second piece, so its length is x + 5. We know that when we add up the lengths of all three pieces, it equals the total length of the sub sandwich, which is 45 inches. So, we can set up the equation: x + 3x + (x + 5) = 45. Simplifying the equation gives us 5x + 5 = 45. Subtracting 5 from both sides of the equation gives us 5x = 40. Dividing both sides of the equation by 5 gives us x = 8. Therefore, the length of the second piece is 8 inches, the length of the first piece is 3x = 24 inches, and the length of the third piece is x + 5 = 13 inches.