Step 1: Express the two legs with one variable.
Let the first–leg distance be $x$ km. Then the second–leg distance is $x-770$ km.
Total distance $D= x+(x-770)=2x-770$.
Step 2: Use the average–speed relation.
Total time $T=\dfrac{x}{440}+\dfrac{x-770}{660}$. Given $\dfrac{D}{T}=500$:
\[
\frac{2x-770}{\frac{x}{440}+\frac{x-770}{660}}=500.
\]
Step 3: Solve cleanly by clearing denominators.
$\text{LCM}(440,660)=1320$:
\[
\frac{2x-770}{\frac{5x-1540}{1320}}=500
\Rightarrow 1320(2x-770)=500(5x-1540).
\]
\[
2640x-1{,}016{,}400=2500x-770{,}000
\Rightarrow 140x=246{,}400
\Rightarrow x=1760.
\]
Thus $D=2x-770=3520-770=2750$ km.
\[
\boxed{2750\ \text{km}}
\]