There is a buyout period between the end of the season and the expansion draft. I can see things going down a few ways.
Say Shattenkirk or Trouba are the targets.
Trouba scenario #1: Rangers acquire Trouba. Sign him to a long term contract, like 6-7 years. Staal or Girardi get bought out in the buyout period before the expansion draft. Everyone gets protected, but the Rangers carry dead salary around for 6+ seasons. Unlikely.
Trouba scenario #2: Trouba is acquired by the Rangers. Signed to a 1 year deal worth $5 million or so. Trouba still remains an RFA. Rangers sign him to a multi-year deal in summer 2017. Rangers therefore don't need to protect Trouba, since he's an RFA.
Shattenkirk scenario #1: Rangers acquire Shattenkirk. Signed to a multi year contract. Rangers do the same as Trouba scenario #1 and buy out Staal or Girardi. Carry around dead cap space for the length of the acquired defenseman's contract. Blegh.
Shattenkirk scenario #2: Rangers acquire Shattenkirk. Pay a lower price because they do not extend Shattenkirk. They do this in order to not have to protect him, as he will be a UFA at the time of the expansion draft, therefore being able to protect everyone. The Rangers play with fire in this scenario though, as they hedge their bets on Shattenkirk extending here after the expansion draft and before July 1.
If you ask me, Trouba scenario #2 would be my course of action, all things considered.