A big thing to consider is there'll be a very good chance of a lockout happening in year 2 of a Karlsson extension. So a team acquiring Ryan might expect there to be a chance that they only need to survive 1 season with Karlsson at 10.5-12.5M+Ryan at 7.25M, and then they might be afforded a compliance buyout because of the lockout which could be used on the final 2 years of Ryan's contract.
DET
(22M in cap next season. They have lots of cap flexibility over the next few seasons with the cap going up and Kronwall and Howard coming off the books the same season as Karlsson's extension would be signed. They'll potentially have a top 5 pick in this draft which would be a nice piece to start with in a Karl trade.)
DAL
(22M in cap next season. They have Spezza's 7.5M and Methot's 4.9M that comes off the books the same season Karlsson's extension kicks in. Methot without a doubt would take a huge dock in pay on an extension if his injury troubles continue. Even with the Seguin raise coming up, they have loads of cap flexibility.)
VGK
(We all know this one already...)
SJS
(They have over 60M of cap space next season......Hertl will need a slight raise from his 3M cap hit, and they might opt to retain Thornton on a similar short term contract. Although, the odds of Thornton being around at 8M the year Karlsson's extension kicks in are low, and Paul Martin will also be off the books. The cap should be at least 7M higher than it is now when Karl's extension kicks in, and their only raises will be slight ones to Couture and Pavelski, and a possible bridge deal to Timo Meier although I'd be surprised if he wasn't a piece in a Karlsson trade....)
NYR
30M in cap space next year with Spooner+Hayes+Skjei+Namestnikov as their main players to sign. They might also look to dealing Zuccarello before his contract expires. Maybe we have to take and buyout Brendan Smith at a cost of 1.3Mx6 years as a consolation for them taking Ryan. That would free up an additional 3.3M of cap fo rthem.
BUF
They have loads of cap flexibility going into the next few seasons. Their only major raise to give out would be to Sam Reinhart if he is not included in a Karlsson trade package and eventually Linus Ulmark if he grows into a starting goalie.
COL
They might have a bit of a tough time due to the amount of ELC talent that'll be looking for raises when Karlsson gets his extension, but they also have a lot of money coming off the books over the next few seasons in Wilson+Soderberg, and a Karlsson acquisition would allow them to trade Barrie elsewhere which would free up further cap.
VAN
Sedins won't be taking up 14M of the cap forever. They have around 28M of cap next year with only the Sedins to sign on what'll probably be 1 year deals, and then a Stetcher, Virtanen, and Granlund. Boeser will probably require a Draisaitl like 8 year deal the same year Karlsson's extension kicks in which is a consideration.
FLA, MTL, NJD, ARZ can all also do it, but I'd imagine we aren't trading Karlsson to MTL, and with the other three they might be budget teams unwilling to spend to the cap.
If a compliance buyout seems too unreliable to hope for, teams can buy Ryan out the same year a Karlsson extension kicks in for 3.6M for 3 years and then 1.9M for 3 years after that.
Let's say Karlsson signs for 10M per on a tax friendly team that is willing to spend to the cap, buying out Ryan would create a situation where a team would have Karlsson signed for what works out to 13.6M for 3 years, 11.9M for 3 years after that, and then 10M for 1 year.