Oooh! I just thought of something! It would be much more poetic if Walt does take care of Lydia with the ricin. But he uses Jesse and Jesse's sense of revenge over Andrea to do it.
Remember, the first time it was to be used was on Tuco. Walt and Jesse were going to kill him with it, but were unable to do so. The second time it was going to be used was against Gus, and Jesse was supposed to deliver it. But he couldn't work up the nerve. Pretty much the entire series, Jesse's been wrestling with the idea of "breaking bad". Walt broke bad a long time ago (when he killed Gus), but Jesse's never really been able to do it. Now with the added incentive of Andrea's murder, Jesse will finally "break bad" and kill Lydia, encouraged by Walt. That would complete Jesse's transformation into darkness as well, since he's been teetering on guilt and self-hatred over his participation in all of this for so long.
Walt takes out the crew and rescues Jesse, learns from Todd of Lydia's attempted hit on Skyler, learns from Jesse of Lydia's successful hit on Andrea, gives the ricin to Jesse, who agrees to continue to cook for Lydia in order to get close enough to slip the ricin to her as Stevia. Lydia dies. Walt dies. Jesse disappears with Brock and the money. Fitting finis.