Paul says elsewhere,
8 "Owe no man any thing, but to love one another: for he that loveth another hath fulfilled the law.
9 For this, Thou shalt not commit adultery, Thou shalt not kill, Thou shalt not steal, Thou shalt not bear false witness, Thou shalt not covet; and if there be any other commandment, it is briefly comprehended in this saying, namely, Thou shalt love thy neighbour as thyself.
10 Love worketh no ill to his neighbour: therefore love is the fulfilling of the law." (Romans 13:8-10).
So loving your neighbor is the righteousness of the Old Law!
We fulfill this law by walking after the Spirit and not after the flesh (i.e. sin).
So we see a consistent theme here. The word "law" used in general (with no actual description attached to it) is in reference to the Old Law in Romans 7 and Romans 8. This helps us to understand that Paul is telling us his past experience or life as a Pharisee in struggling to keep the Old Law unsuccessfully because he did not have Jesus Christ yet (in verses 14-24).
#8. In addition, in Romans 8:2, we see the mention of how there are TWO laws. We also learn from this verse that keeping one of these Laws helps us to be set FREE from the other one.
In Romans 8:2, we see:
Law #1. - Law of the Spirit of Life in Christ Jesus.
This is a New Covenant Law that we are still under. What is this Law?
It is fulfilling the righteousness of the Law (i.e. to love your neighbor - Romans 13:8-10) by walking after the Spirit (See Romans 8:3-4).
Law #2. Sin and Death.
This is in reference to the Old Covenant Law as a whole (i.e. the 613 Old Testament Commands within the Torah). It is called the Law of Sin and Death because you could physically be put to death by not obeying this Law.
What is the relationship of these two laws in Romans 8:2?
Keeping the New Law helps us to be free of the Old Law.
For there is no condemnation to those who are in Christ Jesus who WALK not after the flesh, but after the Spirit. (Romans 8:1).