The battery expander doesn't effect the programming at all.
For instance if you wire from motor port 1 to input A on the expander and then output A on the expander to a motor, the motor will be controlled by programing motor[port1]. Note that on the expander all the white wires are toward the center.