Notice the picture we know DE, or the whole segment is 10x-12 and P is the midpoint so.. the point P is cutting DE in two equal halves, namely, DP and PE so... whatever 10x-12 is, DP is half of that thus
solve for "x",
how long is DP? well, once you get "x", plug it in 3x+2, that's how long DP is :)