To avoid working with fractions, assume a total distance that is a common multiple of the denominators.
For denominators $4$, $3$, and $12$, let the total distance be $1200 \text{ km}$.
- Part 1: $300 \text{ km}$ at $20 \text{ km/hr} \rightarrow T_1 = 15 \text{ hours}$.
- Part 2: $400 \text{ km}$ at $30 \text{ km/hr} \rightarrow T_2 = 13.33 \text{ hours}$.
- Part 3: $500 \text{ km}$ at $25 \text{ km/hr} \rightarrow T_3 = 20 \text{ hours}$.
Total time $= 15 + \frac{40}{3} + 20 = 35 + \frac{40}{3} = \frac{145}{3} \text{ hours}$.
Average speed $= \frac{1200}{\frac{145}{3}} = \frac{3600}{145} = \frac{720}{29} = 24\frac{24}{29} \text{ km/hr}$.