Your answer would be 28.
We can find this by first forming the equation 3x + 2 = 5x - 6, as P is the midpoint and so DP = PE.
3x + 2 = 5x - 6
- 3x
2 = 2x - 6
+ 6
8 = 2x
÷ 2
x = 4
Now we substitute in 4 when we add together (3x + 2) + (5x - 6), as these two parts make up the whole line:
(3 × 4) + 2 + (5 × 4) - 6 = 12 + 2 + 20 - 6 = 34 - 6 = 28
I hope this helps!