The law was "added because of (or for) transgression" and "was put in charge to lead us" could mean one of the following:
- It managed and restrained our sin.
- It exposed sin and declared it to be violation of God's law.
- It provoked and deepened by making God's demands explicit.
- It awakened guilt and so gave individuals a sense of their need for forgiveness.
I think number 2 suits the flow of God's argument best, although I think all four are true and taught elsewhere in Scripture.