let's say the 3 pieces are a, b and c.
a = shortest piece
b = middle piece
c = longest piece
we know that a + b + c = 56, that's the length of the sandwich, rather long, but heck.
since the shortest piece is a, and the middle piece is 6 longer than that, then b = a + 6.
we also know the shortest piece is 8 less than the longest, well, c is the longest, and 8 less than that is c - 8, thus a = c - 8, and therefore a + 8 = c.
![image](https://img.qammunity.org/2019/formulas/mathematics/college/uk6eovgafmvwvo267am1o7bghz2rdxga3b.png)