Romans 8:28 — And we know that all things work together for good to them that love God, to them who are the called according to His purpose.
Them that love God — believers as a class — result
Them that are called — cause
All things — circumstances in general but with special reference to adversity
God works things with design for good. It's not luck, He causes it. Now unto Him that is able to do exceeding abundantly above all that we ask or think, according to the power that worketh in us, unto Him be glory in the church by Christ Jesus throughout all ages, world without end. Amen (Ephesians 3:20-21).
Verse 26 — we know not how to pray
Verse 28 — we know all things work together
It was the sin of Naomi's son in marrying the Moabitess, Ruth, when the law sternly forbade such a marriage, that ultimately brought Ruth into the fold of God. She would never have had Naomi as a mother-in-law if this sin had not been committed, and she would not have been able to say, Intreat me not to leave thee, or to return from following after thee; whither thou goest I will go; whither thou lodgest I will lodge; thy people shall be my people and thy God my God (Ruth 1:16). The sin of her husband in marrying her brought her to a widowhood which later put her in the line of the mothers of the Messiah, the Lord Jesus. She had been chosen by God for this purpose and the Lord caused the events of human living, including human sin, to bring about His purposes.
And one must never be drawn into the logical fallacy of thinking that this makes God a partner in sin, or that He condones sin in any way. God could never have worked with the human race if He had not worked with them as sinners. We are sinners, and the whole pattern of the life of each of us is made by the interweaving of the acts of our Adamic natures and the results of those acts. Even when we have been born again the flesh is present with us, and even after we know that we have been joined to Christ the living Head of our new spiritual relationship to God, we are aware of the continuing presence of the body of death within us. Donald Grey Barnhouse, God's Heirs, pages 154-155.