Artificial intelligent assistant

Puzzle. Transfer maximal coal using a train We need to transfer coal from point $A$ to point $B$ using a train. There is $9000$ tonne at point $A$. The distance between point $A$ and $B$ is $3000$ km. Train can carry only $3000$ tonne included its fuel. Also train consumes $1$ tonne coal per $1$ km. How much coal can be transferred from point $A$ to $B$? I can do only $1500$. But can't prove it is optimal.

Presumably you are allowed to dump coal along the way and pick it up later. You will leave $A$ three times, so will come back to $A$ twice. The first depot should be where five trips burn $3000$ coal so you can leave twice going forward. That means the first depot is $600$ km in and when you leave from there outbound the first time there is $3000$ on the ground and $3000$ on the train. You want to leave the second depot with the train full and will make three trips between the first and second, so they should be $1000$ km apart. You leave the second depot with $3000$ and burn $1400$, arriving with $1600$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b029e10795ff618b838879a3bddcaad9