On Jedd, as long as he's around a 1 fWAR player for most of the deal he's worth the money he's making. The last few years balloon that deal a bit but one of the $13 mil years has a buy out. Also, you have to factor in losing Castro's money for presumably Baez and gaining a cheaper Ross rather than Price or whomever they would chase in FA. Additionally, it's possible Baez isn't quite ready and Jedd might start some at 2B. I'm not holding out a ton of hope but his BABIP has been substantially lower than you'd expect. At a career .270 BABIP, his .228/.289/.383 looks pretty meh. But if you toss 30 points on his average and OBP and push him to .258/.319 with 20 HR power out of 2B and he might not be that bad a trade chip later.
Keep in mind he's also played so many games in PETCO which isn't a hitting friendly place. He's a career .216/.283/.396 hitter in PETCO over 590 PAs and a .240/.295/.372 hitter away over 587 PAs. That might not seem like much difference admittedly but young players tend to hit better at home. For example, Bryant is hitting .288/.400/.588 at wrigley and .225/.320/.337 away. Also keep in mind the difference between Rizzo in PETCO vs wrigley(.167/.298/.314 at PETCO vs .280/.381/.477 in wrigley).
That's not to say I think Jedd will be an amazing player but I think you can work around his money if he's what it takes to get a pitcher you like.