Give the RFAs their market value, trade a single player (Nyquist) and you have sufficient cap space. It wouldn't be difficult in the slightest.
That being said, as much as I would love to have a player like Tavares, it would be like putting lipstick on a pig at this stage. Also, there are teams that are much better fits for a player like Tavares. Even a team like Carolina makes more sense, and I would normally never list that franchise as a hotter destination than Detroit. They need a high end center and they would benefit from being able to bump a few players down a bit. With that D core, adding Svechnikov or Zadina, slotting in Tavares with the likes of Necas, Aho, Skinner, Teravainen, Lindholm...that's cooking with fire. Maybe they move someone like Faulk or Slavin for an established goalie, and that team would be a playoff team immediately, and a contender within a few years.
Tavares is a piece that can transform your team, but at this point he's more of a luxury that you would add after getting the rebuilt foundation set, not necessarily a piece of the foundation.