In tiangle ABC, centroid D is on the median line segment AM. AD=x+4 and DM=2x-4. Find AM.