It won't cost any of Stan's money. The Rams would spend the salary cap with or without Donald. It's just that less money will go to providing depth for the Rams, so that the Rams will have to gamble more, hoping 6th rounders are ready to contribute in the (inevitable) case of injuries. Instead of being able to sign desirable older FAs, the Rams will go with more of the dregs.
The Rams staff is smart, but more gambles makes it much more likely that they miss out, that there's not a good backup QB available, or good depth on the OL, or somebody to fill in when a linebacker gets hurt.