The law of the Spirit of life.—A phrase defining more fully the mode in which the union with Christ becomes operative in the believer. It begins by imparting to him the Spirit of Christ; this Spirit creates within him a law; and the result of that law is life—that perfect spiritual vitality which includes within itself the pledge of immortality.
From the law of sin and death.—The direct contrast to the foregoing. Not here the law of Moses, but the power of sin, the corrupt element in our nature, acting upon the soul, and itself erecting a kind of law, saying, “Thou shalt,” where the law of God says “Thou shalt not;” and “Thou shalt not,” where the law of God says “Thou shalt.” The effect of this reign of sin is death—spiritual death—bearing in itself the pledge of eternal death.
Transgression came before the law of God, not the other way around.
"Wherefore then serveth the law? It was added because of transgressions," (Galatinas 3:19a)
"Nevertheless death reigned from Adam to Moses, even over them that had not sinned after the similitude of Adam's transgression, who is the figure of him that was to come." (Romans 5:14)
"Whosoever committeth sin transgresseth also the law: for sin is the transgression of the law." (1 John 3:4)
"sin, when it is finished, bringeth forth death." (James 1:15b)
I don't know how scripture could make it any more clear.
We have to distinguish two meanings of law. In the stricter sense, it signifies the authoritative expressions of the will of a ruler proposed for the obedience of man; in the wider, almost figurative sense, it means nothing more than the generalised expression of constant similar facts. For instance, objects attract one another in certain circumstances with a force which in the same circumstances is always the same. When that fact is stated generally, we get the law of gravitation. Thus the word comes to mean little more than a regular process. In this context the word is used in a sense much nearer the latter than the former of these two. ‘The law of sin and of death’ cannot mean a series of commandments; it certainly does not mean the Mosaic law. It must either be entirely figurative, taking sin and death as two great tyrants who domineer over men; or it must mean the continuous action of these powers, the process by which they work. These two come substantially to the same idea. The law of sin and of death describes a certain constancy of operation, uniform and fixed, under the dominion of which men are struggling. But there is another constancy of operation, uniform and fixed too, a mighty antagonistic power, which frees from the dominion of the former: it is ‘the law of the Spirit of life in Christ Jesus.’