In a magnetic field, a current-carrying conductor experiences force. The magnitude of this force grows as the amount of current, the length of the conductor and the strength of the magnetic field grow. As a result, the magnetic force exerted on rod AB will get stronger and its displacement will increase if the length of rod AB increases.