As OP has it, Collins would take $17M more this year at risk of losing $6M overall. You can do the math on having $17M more one year earlier, but he would only have to sign a contract of $6M or more to make even without considering inflation. He has a lot more potential to earn more than $6M, including the chances that his contract is guaranteed (to facilitate a trade for example) where he would make out like a bandit. If the Jazz keep him he would essentially gain $17M for free. His contract wouldn’t be $42M and $5M. It would be $42M, then $25M with $5M guaranteed.
The exact amount could be negotiated, $5M is a made up number. Like I said, you could theoretically give him the exact same amount guaranteed.