Either or he will be a hab
I think both parties want to continue with him as a Hab.
But sometimes it's a business and it doesn't work out. MB may not want to give a big cap hit - or even a decent cap hit - to Gallagher on an 8 year deal. That's a big risk for a player that will be 29 when the contract kicks. Anderson got himself a 7 year deal. But it starts now, when he's 26. MB didn't sign Anderson past 32. But Gallagher wants a big cap hit for himself at the ages of 33, 34, 35, 36. It's impossible for anyone to know how effective he'll be at those ages - how many injuries he'll have suffered, when his body will start to slow down, as is normal for NHLers after 33.
But even if MB doesn't want to go 8 years, the Gallagher camp may correctly assert: I can get 8 years on the open market. At which point, MB either has to go against his beliefs and risk having a big cap hit against the cap without much production over the 2nd half of the contract, or he has to tell Gallagher he just can't do it. you'll have to go elsewhere. At which point Gallagher either has to bite the bullet for the team or get his lucrative payday somewhere else. It's his opportunity to set not only is family up, but his great great great great grandchildren up for life.
No guarantees either party gives in when there is so much at stake on both sides.