But I don't know how to programme them
Look at the signals you get with the motor control, wire them to the Arduino and simply set these signals high or low depending on what you want the motor to do.
(the wheelchair must be able to clim stairs).
Sounds like another over ambitious beginners project, given that you don’t even know how to turn a motor on.