In every triangle, the centroid divides each segment starting through a vertex and passing through it (that is, the segments AZ, BY and CW) in two parts, where one part (starting from the vertex) is two times the other part.
So we have the following relations:
So using the value XZ = 3, we can find the value of AX:
Then, since the segment AZ is the sum of the segments AX and XZ, we have:
So the length of AZ is equal 9.