motor and the ESC. Looks like you got it backwards.
It is not a question of which is longer. It is a question of how long? But yes, when lengthening wires it is best to lengthen the wires from the motors to the ESCs rather than from the batteries to the ESCs–as we have it here. But when ya gotta, ya gotta. And note that the wires in this case are less than the 12- inch recommended maximum. See our note in blue on the first page of this article.
All of your wires are so long?
If you build twins with 50-inch wing spans or more, you are going to have long wires. No escape! I have built twins with wires up to 24 inches long with no problem. However, when the wires start getting that long it is time to consider wiring in capacitors.