The Thunder gift the Lakers with a ready made team Second Team and fix the Lakers salary problems by taking Westbrook's contract off their hands.
In exchange the Lakers give the Thunder 2 First Round Picks and several Second Round Picks.
The only reason this deal Failed the Trade Machine is because Green is a recent trade, so this can be executed as 2 different trades with the Green trade executed 2nd in exchange the 2028 First Round Pick Swap (which can't be shown in the Trade Machine).
The Lakers made a costly mistake taking Westbrook but if they want him gone, the Lakers are going to have to pay dearly.
The Thunder then will buyout Westbrook's contract.