Some homerism from both sides on this one.
If you're comparing Rask vs. Andersen, I think it's quite flawed to suggest that one is dramatically "better" than the other. Rask is a front-half-of-a-tandem goalie at this point in his career, and plays on a much better defensive team, so his numbers will of course be expected to be better. Andersen is a workhorse goalie who plays on a poor defensive team.
Given that they both have 1 year left, you can very easily nullify the salary difference by Boston retaining $2m -- and at that point, I think this is the way both teams look at it:
Toronto: The reasons to trade Andersen is to a) get a little younger, b) get a little cheaper, and c) take advantage of the extremely liquid goalie market, and d) With confidence in Campbell, maybe transition to more of a tandem situation. The problem with this deal is that it only accomplishes 1 of those things -- so I think the Leafs would rather stick with the status quo and maybe reduce Andersen's workload a bit.
Ultimately, I think if Toronto can't find the cheaper option, the deal strikes me as somewhat pointless as I do believe that Rask is considering retirement.
Boston: The reasons to trade Rask are a) he's getting up there in age, b) he's expensive, and c) he left this season on a bad note with the team after leaving the bubble. The problem with this deal is that Andersen doesn't really solve the expensive part (no salary difference this year after retention) and he's probably looking at $6m on a new deal. He isn't dramatically younger, and they are already quite well setup for a true tandem situation with Halak.
Everyone seems to be wanting to go tandem these days, but if Boston is thinking more of a 60-25 split or 55-30 (what Rask used to do) beyond this season, then I think this deal can certainly have merit, especially considering that the B's look to be at least 1 season away from throwing Vladar to the backup role.