check the picture below.
a centroid, is the point where all the medians meet, a median starts off a corner,vertex, and goes to the middle of the opposite side, thus is called a median.
since we know that C is the centroid of the triangle, that simply means RX is a median, and that simply means that PX = XQ, and since PQ = PX + XQ, well, you know what that is, PQ = 25 + 25.
a peculiar issue of a centroid in a triangle is that it cuts all medians in a 2:1 ratio.
in the median PY, PC : CY are on a 2:1 ratio, and we know that CY is 9, thus
[tex] \bf \cfrac{PC}{CY}=\cfrac{2}{1}\implies \cfrac{PC}{9}=\cfrac{2}{1}\implies PC=18
\\\\\\
PY=\stackrel{PC}{18}+\stackrel{CY}{9} [/tex]
likewise, the median QZ has QC : ZC on a 2:1 ratio, thus
[tex] \bf \cfrac{QC}{ZC}=\cfrac{2}{1}\implies \cfrac{12}{ZC}=\cfrac{2}{1}\implies \cfrac{12\cdot 1}{2}=ZC\implies 6=ZC
\\\\\\
ZQ=\stackrel{QC}{12}+\stackrel{ZC}{6} [/tex]