If the motor only draws a few mA this could work. Think about the path the current takes in getting to and from the motor. When the input is LOW, output B is sourcing current to the motor and returning through the LOW input. Therefore the input needs to be able to sink the motor current.
A slightly better circuit would be to use an inverter and a buffer (or two inverters in series) with their inputs tied together. This way when one's output is HIGH and other's is LOW. Microchip has a nice chip that does this well for small motors or as a MOSFET gate drive for larger motors. Part numbers are TC4467, TC4468 & TC4469. There is also app note #906b on using these for an Stepper motor drive (think two DC motoers instead of the two coils in the stepper). These chips have a continuous output rating of 300mA.