Shipsy interview question

how do you optimize this whole logistic process