It's OK, there are easy fixes to this problem. Here's my solution to this issue. If you buy Staal out NEXT YEAR, you can effectively spread out the money saved on smith by pushing down the road a year with Staal's cap hit.
I made this sheet myself, it encompasses all of the dead money, calculates the savings for the buyouts, and then shows you the actual costs of dead money.
Smith buyout right now alleviates 2019-20 cap crunch
Girardi Buyout $ drop + Staal Buyout in 2020-21 alleviates Smith's buyout hit in this year
This effectively extends the Girardi Buyout Money for 2 more years beyond this year, but it opens up cap space for the next 2 years. at the end of that 2020-21 season, the Shattenkirk Contract falls off.
All about balance
EDIT: Am going to redo this later with buying out Staal first + burying Smith. If the rangers are strictly looking for cap relief, there's an extra net of $1M for this year in buying out Staal + burying smith.