This can be stated in active form, and the abstract noun "life" can be translated with the verb "live." AT: "if God had given a law that enabled those who kept it to live" (See: [[rc://en/ta/man/translate/figs-activepassive]] and [[rc://en/ta/man/translate/figs-abstractnouns]])
"we could have become righteous by obeying that law"
# scripture imprisoned everything under sin. God did this so that the promise to save us by faith in Jesus Christ might be given to those who believe
Other possible meanings are 1) "because we all sin, God put all things under the control of the law, like putting them in prison, so that what he has promised to those who have faith in Christ Jesus he might give to those who believe" or 2) "because we sin, God put all things under the control of the law, like putting them in prison. He did this because what he has promised to those who have faith in Christ Jesus he wants to give to those who believe."
# scripture
Paul is treating scripture as though it were a person and is speaking of God, who wrote scripture. AT: "God" (See: [[rc://en/ta/man/translate/figs-personification]])