In Triangle ABC, segmentS CM, BP, and AN are medians

If CM=3X+6 and CE=x+12, find the value of x. Being that e is the centroid.

I know that from the vertex to the centroid is 2/3 of the entire median, but i cant figure out what x equals

I think the value of x equals 18, but im not sure

Also, I need help answering

If EN= X-5 and AE=X+17, find the value of AN.