You can hit problems unless both of the devices that you feeding have the same DC common. Does the second device have an isolated input, and remember, you won't just need the A and B signal but also the 0V. Next you need to know that the drives 5V supply can cope with the extra load of another pair of inputs. It is one of those things that might work perfectly or might come back to bite you on the bum. Personally I would look at using a splitter, but hey, I like to sleep nights.
Bryan