This is pure speculation from me, but I highly suspect the Mayo signing involves Jason Terry deal with the Celtics.
Mavs only has 2.6 million MLE left, and Mayo at least worth 7-8 million/yr. Since Terry reportedly was offered a full MLE at 5 million, it puts Dallas in place to S&T Terry(Bird Right) for Mayo.
In this case, Memphis is the third team. They have no cap space and no MLE or nothing, a pick or two from the Celtics and Dallas would be nice and a big trade exception was created to sign new players. So it makes sense for them as well.
Still, its just pure speculations.