In broad terms it seems that in the earlier chapters of Romans Paul is concerned with "justification" (forensic righteousness) while here in Romans 6-8 he is concerned with with "sanctification" (practical righteousness). I think it can be useful to view his polemic as describing two systems designed to produce practical righteousness. Verbally he is drawing a diagram like the one in the image below of how these systems are designed and comparing and contrasting them to show that the new one is the only one that works:

He vividly describes how the system based on Torah and the flesh fails because of "Mr. Sin" who undermines it resulting in the principle of "sin generates death" (Romans 7) and then he describes the new system based on faith and the spirit resulting in the principle of "the breath of life" (Romans 8:1-11).
Paul is quick to point out that the problem with the first system is not the law but rather "Mr. Sin":
Rom 7:7 What shall we say then? Is the law sin? God forbid. Nay, I
had not known sin, but by the law: for I had not known lust, except
the law had said, Thou shalt not covet. Rom 7:8 But sin, taking
occasion by the commandment, wrought in me all manner of
concupiscence. For without the law sin was dead. Rom 7:9 For I was
alive without the law once: but when the commandment came, sin
revived, and I died. Rom 7:10 And the commandment, which was
ordained to life, I found to be unto death. Rom 7:11 For sin, taking
occasion by the commandment, deceived me, and by it slew me. Rom
7:12 Wherefore the law is holy, and the commandment holy, and just,
and good. Rom 7:13 Was then that which is good made death unto me?
God forbid. But sin, that it might appear sin, working death in me by
that which is good; that sin by the commandment might become exceeding
sinful. Rom 7:14 For we know that the law is spiritual: but I am
carnal, sold under sin. Rom 7:15 For that which I do I allow not:
for what I would, that do I not; but what I hate, that do I. Rom
7:16 If then I do that which I would not, I consent unto the law that
it is good. Rom 7:17 Now then it is no more I that do it, but sin
that dwelleth in me. Rom 7:18 For I know that in me (that is, in my
flesh,) dwelleth no good thing: for to will is present with me; but
how to perform that which is good I find not. Rom 7:19 For the good
that I would I do not: but the evil which I would not, that I do. Rom
7:20 Now if I do that I would not, it is no more I that do it, but
sin that dwelleth in me. Rom 7:21 I find then a law, that, when I
would do good, evil is present with me. Rom 7:22 For I delight in
the law of God after the inward man: Rom 7:23 But I see another law
in my members, warring against the law of my mind, and bringing me
into captivity to the law of sin which is in my members. Rom 7:24 O
wretched man that I am! who shall deliver me from the body of this
death? Rom 7:25 I thank God through Jesus Christ our Lord. So then
with the mind I myself serve the law of God; but with the flesh the
law of sin.
So in system one the law, commandeered by Mr. Sin produces death. But in system two, the breath of life (God's spirit) indwells and commandeers the believer and produces righteousness and life:
Rom 8:1 There is therefore now no condemnation to them which are in
Christ Jesus, who walk not after the flesh, but after the Spirit. Rom
8:2 For the law of the Spirit of life in Christ Jesus hath made me
free from the law of sin and death. Rom 8:3 For what the law could
not do, in that it was weak through the flesh, God sending his own Son
in the likeness of sinful flesh, and for sin, condemned sin in the
flesh: Rom 8:4 That the righteousness of the law might be fulfilled
in us, who walk not after the flesh, but after the Spirit. Rom 8:5
For they that are after the flesh do mind the things of the flesh; but
they that are after the Spirit the things of the Spirit. Rom 8:6 For
to be carnally minded is death; but to be spiritually minded is life
and peace. Rom 8:7 Because the carnal mind is enmity against God:
for it is not subject to the law of God, neither indeed can be. Rom
8:8 So then they that are in the flesh cannot please God. Rom 8:9
But ye are not in the flesh, but in the Spirit, if so be that the
Spirit of God dwell in you. Now if any man have not the Spirit of
Christ, he is none of his. Rom 8:10 And if Christ be in you, the
body is dead because of sin; but the Spirit is life because of
righteousness. Rom 8:11 But if the Spirit of him that raised up
Jesus from the dead dwell in you, he that raised up Christ from the
dead shall also quicken your mortal bodies by his Spirit that dwelleth
in you.
When in English translations Paul speaks of "the law of the Spirit of life" he is actually alluding to the "principle of the breath of life" described in Genesis 2:7:
Gen_2:7 And the LORD God formed man of the dust of the ground, and
breathed into his nostrils the breath of life; and man became a living
soul.
This principle that the breath brings life is evident throughout scripture. I'll just note one example in addition to the making of Adam:
Joh_6:63 It is the spirit that quickeneth; the flesh profiteth
nothing: the words that I speak unto you, they are spirit, and they
are life.
And when Paul speaks of the "righteousness of the law" he is alluding to his description of the unbelieving Jew who has the commands and even agrees with their just demands but is frustrated in his attempts to realize them. Paul is saying that in the new system the ones justified by faith are indwelt by the spirit and the spirit brings about practical righteousness in the believer.
It is this "principle"/ law of "the breath of life" that brings about its own righteous demands, not by Torah but by indwelling the believer. Paul does not suggest that the "output" of the new system is Torah-fulfillment accomplished by the flesh but rather that which is produced by the spirit:
Gal 5:16 This I say then, Walk in the Spirit, and ye shall not fulfil
the lust of the flesh. Gal 5:17 For the flesh lusteth against the
Spirit, and the Spirit against the flesh: and these are contrary the
one to the other: so that ye cannot do the things that ye would. Gal
5:18 But if ye be led of the Spirit, ye are not under the law. Gal
5:19 Now the works of the flesh are manifest, which are these;
Adultery, fornication, uncleanness, lasciviousness, Gal 5:20
Idolatry, witchcraft, hatred, variance, emulations, wrath, strife,
seditions, heresies, Gal 5:21 Envyings, murders, drunkenness,
revellings, and such like: of the which I tell you before, as I have
also told you in time past, that they which do such things shall not
inherit the kingdom of God. Gal 5:22 But the fruit of the Spirit is
love, joy, peace, longsuffering, gentleness, goodness, faith, Gal
5:23 Meekness, temperance: against such there is no law. Gal 5:24
And they that are Christ's have crucified the flesh with the
affections and lusts. Gal 5:25 If we live in the Spirit, let us also
walk in the Spirit. Gal 5:26 Let us not be desirous of vain glory,
provoking one another, envying one another.
The new system is not a repair of the old system but an entirely new design!