4. As shown in the figure: In $\triangle A B C$, $D, E$ are points on $B C$, $B D: D E: E C=3: 2: 1, M$ is on $A C$, $C M: M A=1: 2, B M$ intersects $A D, A E$ at $H$, $G$. Then $B H: H G: G M$ equals ( ).
(A) $3: 2: 1$
(B) $5: 3: 1$
(C) $25: 12: 5$
(D) $51: 24: 10$
4. D Draw $M N / / B C$ intersecting $A D, A E$ at $Q, P$. Let $B H = x, H G = y, G M = z$. By the properties of similar triangles and proportional segments, we have
$$
\begin{array}{l}
\left\{\begin{array}{l}
\frac{x}{y+z}=\frac{B D}{M Q}=\frac{D C}{M Q}=\frac{3}{2}, \\
\frac{x+y}{z}=\frac{B E}{M P}=\frac{5 E C}{M P}=\frac{15}{2} .
\end{array}\right. \\
\left\{\begin{array}{l}
2 x=3(y+z), \\
2 x+2 y=15 z .
\end{array}\right.
\end{array}
$$
(1) Substituting into (2) gives $y=\frac{12}{5} x$.

Substituting into (1) gives $z=\frac{3}{2}\left(\frac{12}{5} z+z\right)=\frac{51}{10} z$.
Therefore, $x: y: z=\frac{51}{10} z: \frac{12}{5} z: z=51: 24: 10$.