I did it based off of AAV, because actual salary would have taken too much time haha
So Ottawa paid/is paying Phaneuf a total of 21M. 14M for the essentially two seasons of play, and an additional 7M for the 4 seasons of 1.75M retained.
A total of 13.4M went to the Leafs. 8M paid to Michalek in cap hit, Cowen only cost 100K-1M, depending on how much he was paid in the last quarter of the 15-16 season. the Leafs then bought him out costing a net of 100K on the caphit. Colin Greening got paid 5.3M.
So, if you were to look at actual salaries, it gets close to a wash. Even if you add in Cowen's 6.2M they would of paid off the cap directly to him, it's 19.6M to TOR and 21M to OTT.
So yeah, money wise, it was a wash for Ottawa and they got a deep run, which may or may not have been helped by Phaneuf.
Toronto, it was a big win for. As they got rid of Phaneuf's remaining 35M, and only had to take on a total of 13.4M on the cap in a year they had no use for the cap space anyway