Charles Haddon Spurgeon said this quote

Remember how it is written of Job, “The Lord turned the captivity of Job, when he prayed for his friends.” While he prayed for himself, he remained a captive; but when he prayed for those unfriendly friends of his, then the Lord smiled upon him, and loosed his captivity