In a sign-and-trade deal, a team (in this example, OKC) simply needs to have the incoming/outgoing salary ledger legal under the normal rules. Since Adams' contract is $25.8M next year, in a sign-and-trade we could sign WCS to a contract up to $32.4M per year and still execute a legal sign and trade with OKC for Adams via the 125% rule. (That, by the way, is well over Willie's max salary of about $27M.) So there would certainly be no issues on the OKC side of a sign-and-trade if they were to send Adams back.
From the Kings' point of view, it would depend fairly heavily on how big of a contract OKC wanted to give Willie. If they wanted to get near the max, we'd have no issues with the cap since the salaries we'd be sending out and receiving would be close to equal. If they wanted to give him $10M a year as you suggest (I think that number ends up being a good bit lower than what WCS will end up getting), then we'd have to make sure we have the cap space to absorb Adams' contract. As it stands right now with Barnes having opted out, we have a pretty clear $56M of cap space whose only real encumbrance is the cap holds for Barnes ($32.7) and WCS ($14.1M). Since Adams + Barnes' cap hold makes about $58.5M, we'd have to make some sort of maneuver to make it happen coming our way (again, assuming the salary differential between WCS and Adams is big enough that we can't use the 125% rule for salary matching). The easy way would be to finalize the Barnes situation. Nobody expects him to sign for $32M, so if we just signed him to a deal at, say, $20-25M per year, we would then have the cap space to absorb Adams. Or, barring dealing with Barnes first, we could renounce his cap hold, which would give us plenty of space to absorb Adams and still leave us enough cap space after the deal (about $30M) to sign Barnes to a Barnes-size contract without having to retain his Bird Rights in the first place. If neither of those options are good, then we'd have to clear a little bit of room. Cutting Yogi's non-guaranteed money would be close to enough to bring in Adams while retaining Barnes' Bird Rights, but with cap holds for minimum roster size it would kind of be on the edge and I'm not inclined to whip out the slide rule to figure out if it actually works or not as this seems an unlikely scenario.
Bottom line is, we should be able to both re-sign Barnes and, if OKC and WCS are both game, to sign-and-trade Willie for Adams without too much crazy maneuvering.