Here, we add all the side length equations;
2x + 5 + x - 3 + 3x + 1 = 39
Add like terms
6x + 3 = 39
Subtract 3 from both sides
6x = 36
Divide by 6
x = 6
We are not done yet, since the question is asking for the side lengths, we have to plug in 6, so now we get:
2(6) + 5 = 17
6 - 3 = 3
3(6) +1 = 19
The lengths of the sides of the triangle are 17, 3, 19
[If you want to check, you can always add up 17, 3, and 19. You'll get 39)
Hope this helped! :)