In any triangle, the centroid divides each median in the ratio 2 : 1. See the lesson Medians of a triangle are concurrent in this site. So, 2x+2 = 16 ====> 2x = 14 ====> x = = 7 units.