Hi,
you can use an NPN or PNP transistor as a switch.the number of the transistor is depends on the current that your motor need.and also you you can use 74HC4066(analoge switch) but it is depends on your motor current.
you can use 7805 regulator to have the 5 volt regulated voltage .
you should connect the 9 volt to the input and connect the ground to the middle pin and take the 5 volt from output of the ic.
Bookmarks