All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Saying thrice to one's wife, "You are unlawful to me" is an indirect expression of divorce and only intention determines its effect. If the husband intended, by this saying, divorce, Thihaar (making one's wife unlawful by saying "You are like my mother's back.") Or 'Eelaa’ (swearing not to have sexual relations with one's wife), then what he intended is effected. If he did not intend anything or intended only to threaten her, then expiation for breaking an oath is due.
Accordingly, if he intended to make a threat, only expiation for a broken oath is due. It will be better and more prudent if he also makes the expiation for Thihaar.
Allaah Knows best.