I think you have that backwards, don't you. He would count as 0M in outgoing salary for the Jazz and 18M as incoming salary for Charlotte.* But yeah, impossible for a team over the cap.
*source:
https://www.hoopsrumors.com/2018/07...ntract-rules-have-affected-recent-trades.html "If a player had a $10MM salary with a partial guarantee of $1MM, his outgoing salary in a trade was the same as it would have been for a player who had a fully guaranteed $10MM contract. That’s no longer the case under the league’s new CBA, however... In the example above, the player with a $10MM salary and a $1MM guarantee would now only count for $1MM for outgoing salary purposes in a trade, but the team acquiring him would still have to consider him a $10MM player."