A centroid divides a median into 2 parts such as AE is divided into AG and GE.
The shorter half is half the length of the longer half. If the longer half (AG) is 8, the shorter is 4 which is GE.
Now you know both halves so you can now just add them together
8 + 4 = 12