the pieces are
x,y,z
longest to shortest
y is 5 more than z
y=5+z
z is 8 less than x
z=x-8
find everything in terms of x
y=5+z
sub z=x-8
y=5+x-8
y=x-3
so we got
x=x
y=x-3
z=x-8
total length is 52
x+y+z=52
x+x-3+x-8=52
x+x+x-3-8=52
3x-11=52
add 11 to both sides
3x+11-11=52+11
3x=63
divide both sides by 3
x=21
y=x-3=21-3=18
z=x-8=21-8=13
the pieces are 13in, 18in, 21in