R•----S•-----•T
The total (RT) is 24. So you need to find the segments that make up RT. (RS & ST) Set up your equation by plugging in what you know. We know RS is x²+8. We also know that ST is 3x+6. And that RT is 24. So, RS + ST = RT. x²+8 (RS) + 3x+6 (ST) = 24 (RT). Then just combine like terms, and solve for x. Then plug x back into each equation (such as RS & ST) to figure out what they equal.