12. (5 points) Three people, A, B, and C, start from point A to point B at the same time. The ratio of their speeds is 4:5:12, where A and B walk, and C rides a bicycle. C can carry one person at a time (the speed remains unchanged). To ensure that all three arrive at point B in the shortest time possible, the ratio of the distances walked by A and B is $\qquad$
【Solution】: First, consider the total distance as "1". The speeds of A, B, and C are 4, 5, and 12, respectively.
Assume C starts from point $a$ and carries A to a place $x$ distance away, then leaves A to walk on his own, and C returns to pick up B, arriving at point $b$ simultaneously with A.

The time C needs to meet B is $\frac{x-\frac{5 X}{12}}{12+5}$,
The distance C has walked when meeting B is: $\frac{X-\frac{5 X}{12}}{12+5} \times 12$,
The total distance C walks from $x$ to return and pick up B, then return to $x$, and finally reach $b$ is:
$$
\frac{X-\frac{5 X}{12}}{12+5} \times 12 \times 2+(1-X)=1-\frac{3}{17} X \text {, }
$$

The time used is: $\frac{1-\frac{3}{17} X}{12}$,
The time A needs to walk to $b$ is: $\frac{1-X}{4}$,
Setting the two times equal: $\frac{1-\frac{3 X}{17}}{12}=\frac{1-X}{4}$,
Solving for $x$ yields: $x=\frac{17}{24}$;
So the distance A walks is: $1-x=\frac{7}{24}$,
The distance B walks is: $\frac{5 X}{12}+\frac{X-\frac{5 X}{12}}{12+5} \times 5=\frac{10}{24}$,
The ratio of the walking distances of A and B is: $\left(\frac{7}{24}\right):\left(\frac{10}{24}\right)=(7: 10)$;
Answer: The ratio of the speeds of A and B is 7: 10.