The Phantom motors have three different color wires, red, yellow and black. They are wired to the ESC with the black wire on the outermost solder pad on the ESC board. The red and yellow wires are attached to the other two pads with the order of attachment determining the rotation direction. If you replace the motors with the same type, then just match the order of the colors on the original motor. If your new motors have all wires the same color then just choose any order and switch any two wires if the motor runs in the wrong direction.