Pavlovic's deal is only guaranteed for $1.5 million. Trading him plus Wallace ($14.5 million) for Shaq ($21 million) immediately saves $5 million if they cut Pavlovic. Since Phoenix is above the luxury tax, that's also $5 million they don't have to pay tax on, meaning their total savings would be $10 million.
If Wallace agrees to a buyout or voluntarily retires, Phoenix would save even more money. Indeed, if Wallace agreed to a large enough buyout (say, 50% of his remaining deal) Phoenix might even be able to avoid paying luxury tax at all (which not only would save them money, but also would mean that they'd be in the pool of teams that receives proceeds from the dispersal of the luxury tax that other teams pay.)
All told, this trade would save Phoenix a minimum of $10 million, and perhaps as much as $17 - $25 million, or even more.