Considering they're both in the Akatsuki, it's very possible they just both have a contract with the same ninja animal, especially considering it seems to be a very useful creature for (1) capturing jinchuriki -- which was both of their goals, and (2) working in a 6-person formation by being invisible and capturing the target when it's thrown off-guard