Guidelines Concerning Implicit Phrases of Divorce
Question

Which of these phrases is a metonymic statement of divorce: “our Lord will spread out for you of His mercy” [Al-Kahf 18:16] or “O Allah, compensate me with someone better than her and compensate her with someone better than me”?
Praise be to Allah.Guidelines on Implicit phrases of divorce
The guideline with regard to metonymic (implicit) statements of divorce is that metonymic statements include any phrase that may be understood as referring to divorce or something else, such as: “Go to your family ,” or: “It is over between us ,” and so on.
In Hashiyat Al-Bujayrami `Ala Al-Khatib (3/491), it says:
“With regard to the words “any phrase that may be understood as referring to divorce or something else”, the guideline is that this applies to wording that may indicate an imminent separation, but it is not widely used as a Shar`i term or a customary term.”
In Al-Mawsu`ah Al-Fiqhiyyah (29/26), it says:
“The scholars are agreed that the metonymic form of divorce means using words that are not usually used for that purpose but could be understood as meaning divorce or something else. However, if the wording could never mean divorce in the first place, then this is not a metonymic form of divorce; rather it is merely nonsense talk and does not imply anything.” 
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said:
“Any wording that could be understood to refer to separation comes under the heading of metonymic statements of divorce." (Ash-Sharh Al-Mumti`  13/70)
Does divorce count when lmplicit phrases are used?
Divorce does not count as such when metonymic phrases are used, unless two conditions are fulfilled:

the person should have the intention of divorce, 
and he should have used words that are indicative of divorce. 

If he utters words that are not indicative of divorce , either in Shar`i terms or according to customary usage, then even if he intended divorce by using those words, it does not count as such.
Ibn Al-Qayyim (may Allah have mercy on him) said:
“Divorce does not count as such unless the person intends it and uses wording that is indicative of divorce. If one of these two factors is missing, then no divorce takes place.
Words and phrases may be divided into those that are explicit and those that are metonymic. Although dividing them in this manner is acceptable in principle, the issue may vary from one person, time or place to another. Therefore, there is no fixed ruling on a particular phrase; a phrase may be regarded as explicit among some people and as metonymic among others, or it may be regarded as explicit in one time or place, and as metonymic in some other time or place.
We see this in reality. Hardly anyone uses the phrase “release” [Al-Ahzab 33:28] with regard to divorce, either explicitly or metonymically, so it is not appropriate to suggest that if a man uses this word then his divorce of his wife is binding, whether he intended it or not." (Zad Al-Ma‘ad  5/291)
Based on that, the phrase “our Lord will spread out for you of His mercy” [Al-Kahf 18:16] is not indicative of divorce, either according to customary usage or in Shar`i terms. Based on that, it is not a metonymic form of divorce.
As for the phrase “O Allah, compensate me with someone better than her and compensate her with someone better than me”, it was narrated from Imam Ahmad (may Allah have mercy on him) that any supplication that refers to divorce could be used as a form of divorce. 
He was asked about a man who said to his wife: May Allah separate me and you in this world and the hereafter. He said: If he intended it as a supplication only, I hope that it does not mean anything. (Masa’il Abu Dawud lil Imam Ahmad (p. 239); Al-Insaf, 8/478)
Ibn Muflih (may Allah have mercy on him) commented on this in Al-Furu` (9/38):
“He did not regard it as meaning anything when one’s intention is simply supplication, from which we may understand that it means something when there is an intention of divorce, or when it is used in general terms, on the basis that the word separate or separation is an explicit term, or because of the context in which he said it.”
Then he (may Allah have mercy on him) mentioned a similar case and said:
“The ruling concerning these three issues is the same. It seems that concerning each issue there are two views: will the context be taken into account and is it sufficient to indicate his intention, or should only the intention be taken into account?”
What that means is: the supplication “May Allah separate me and you in this world and the hereafter” is a metonymic form of divorce. There are two reports from Imam Ahmad (may Allah have mercy on him) about metonymic forms of divorce and whether the intention is essential for the divorce to be valid, or is circumstantial evidence sufficient? In a number of Fatwas on our website we have stated that the correct view is that metonymic forms of divorce do not count as such unless they are accompanied by the intention of divorce, and circumstantial evidence is not sufficient.
Based on that, the supplication mentioned in the question, “O Allah, compensate me with someone better than her and compensate her with someone better than me”, is a metonymic form of divorce; if the husband intended divorce thereby, then it counts as such, and if he did not intend that, then it does not count as such.
And Allah knows best.