Once he was sold to another the old master had no claim over him. He was completely the property of the new master. One either obeys the Devil in living a life of sin, or obeys Christ by living a life of obedience. But God be thanked that though you were slaves of sin, yet you obeyed from the heart that form of doctrine to which you were delivered. This, in a nutshell, simply repeats what Paul had said at the beginning of the chapter.
Obedience comes from the heart.
It is there that we receive the benefits of the shed blood of Christ. It is the expression of our obedience that is required of all men. This gives the two actions that are required on the part of the slave of sin in order to become free from sin. Obey the form of doctrine - by being baptized into Christ. We have become free from the domination of sin in our lives.