Lowell and his $12 million 2010 contract was traded to the Rangers a few weeks ago -- along with $9 million in cash -- for catcher Max Ramirez. The deal was canceled because Lowell's physical turned up a torn radial collateral ligament in his right thumb, an injury for which he underwent surgery on 12/30 which was deemed successful. He is expected to be cleared to throw a baseball in six weeks (around 2/10) and could swing a bat two weeks after that. At all events, he could very well be ready to roll on Opening Day.
Lowell, once a solid fielder and hitter, has slipped considerably in both areas. He is worth around a half-win with the bat; around minus-one-half-win with the glove. He could be a useful fill-in for David Wright at the hot corner and might reasonably platoon with Daniel Murphy at first, though Lowell's barely-adequate bat at third would look pretty iffy across the diamond.
Castillo has two years and $12 million remaining on the deal he signed after the 2007 season. While he is still a capable on-base and steals guy, he has zero power and his defense has steadily betrayed him in recent years.
The money being equal, there is something to be said for getting the $12 million off the books in one year rather than two, but that's probably a marginal advantage at best.