To find x, we need to first simplify the equation.
3 (x+2)-3+x+17 = 40 Subtract 17 from both sides. 3 (x-2) - 3 + x = 23 Distribute the parenthesis. 3x - 6 - 3 + x Combine like-terms. 4x -9 = 23 Add 9 to both sides. 4x = 32 Divide both sides by 4. x = 8.