I doubt Ainge planned on Brewer being bought out. With Green aboard, it makes it a little harder for Brewer to choose the C's. That said, I wonder of Ainge still makes the Perk deal knowing what he knows right now. Which is Murphy supposedly leaning towards Miami and the aforementioned Brewer now available.
I strongly doubt the Perk deal was made gambling that Troy Murphy would be available for a buyout.
Ainge thought Shaq and JO would be ready for the playoffs and Krstic would be great as a 3rd string big, making Perk expendable. When he found out he could get the 3/4 the team had been missing since Posey, he jumped.
If anything, he made the trade because he didn't want to depend on buyouts to fill the void behind Pierce as he did with Michael Finley last year. So he traded 1 of his 3 injury-plagued starting-quality centers for a healthy 3rd string big and a legitimate back-up 3/4.