You dont remove anything here, you need to remove the motor from its housing, then the wires from inside there and feed them out.
Theres a DC39 stripdown thread in the main forum, that should show you, and tell you how to seperate/reattach the motor housing to the filter unit