Basically you implement a time counter or a clock connected to an ISR. To
differentiate how long you hold a button down, and based on time held
implement different functions, like starting the alternate motor.
So create a timer, say 100 mS, enable its interrupt, and each time ISR
fires inc a time counter. Then in main() test the counter and based on its
value action different tasks. When released you clear the time counter.
For controlling motors :--
You can use a timer for this.
As a button press is detected, start the timer . And as the button is released, stop the timer.
Read the timer value.
If it is more than a threshold value [selected by you, say 2 seconds] then motor2 is started. Else motor1 is started.