Notice the timing of the following:
1. Rom. 6:17-18: "Thanks be to God [same phrase as in Rom. 7:25!] because you were slaves of sin but you obeyed from the heart the type of teaching you received...
... and having been freed from sin you were enslaved to righteousness."
2. Rom. 6:20, 22: "For when you were slaves of sin, you were free to righteousness ...
... but now having been freed from sin and having been enslaved to God, you have your fruit unto holiness."
3. Rom. 7:5-6: "For when we were in the flesh, the passions of sins, which [were aroused] through the law, were working in our members...
... but now we have been discharged from the law ... so that we serve in the newness of Spirit..."
4. Gal. 5:16: "Walk in the Spirit and you certainly will not fulfill the desires of the flesh."
5. Rom. 8:2, 4, 8, 9: "The 'law' of the Spirit has freed you from the 'law' of sin and death ... in order that the just standard of the Law might be fulfilled in us who do not walk according to the flesh but according to the Spirit ... those in the flesh are not able to please God. But you are not in the flesh but in the Spirit, if indeed the Spirit of God dwells in you."
So, we are now equipped from the overall context to understand better Romans 7:25b, the summary of Romans 7:7-25:
"Therefore, then, I myself with my mind serve the law of God but with my flesh the law of sin."
This is a summary of what Paul has been saying in 7:7-25.
E.g., 7:23, "I see a different 'law' in my members warring with the 'law' of my mind and enslaving me with the 'law' of sin that is in my members."
But notice the "state" that these two verses depict:
1. This person serves the law of sin with their flesh.
2. This person is enslaved to the law of sin.
3. The law of sin is in their "members."
But look at when Paul has said repeatedly that these conditions apply:
1. You were in the flesh (7:5; 8:8); you certainly do not [now] fulfill the desires of the flesh (Gal. 5:16).
2. You were slaves of sin (6:17).
3. Sin used to work in your members (7:5).
In fact, for Paul's logic to make sense, 7:7-25 must refer to what we "were" rather than what Christians "are." Otherwise he quite significantly contradicts himself.
And of course the expression "thanks be to God" in 6:17 and 7:25a make this clear.
Rom. 6:17: "Thanks be to God because you were slaves of sin..."
Rom. 7:24-25a: "A wretched person am I! Who will rescue me from the body of this death? Thanks be to God, through Jesus Christ our Lord...
Therefore now no condemnation exists to those in Christ Jesus, for the 'law' of the Spirit of law in Christ Jesus has set you free from the law of sin and death."