I doubt the rangers want to do more than 25% retention. The issue is cap hit next year, not this year.
I think a deal probably looks like:
To NYR: Joker + pick
To Buffalo: Trouba (25% retained),
Buffalo adds a true #4 at premium cost for 2 years. I think he probably pairs well with Power or Bryam. Samuelsson/Trouba has potential as well
All that being said....I doubt we see it. Rangers will probably keep him and simply buy him out next year to make room for their contracts. It's the easiest painless way, and you don't have to worry about moving the contract/retention.