could have done it [closed]

Of your four options, the first one sounds most natural, the second isn't bad (but is a split infinitive), the third sounds awkward, and the fourth seems to need another comma before "really." Let's examine why. The inclusion of the word "really" is rather unnecessary, unless the speaker believes the listener has doubts about the truth of what they are saying. I imagine the conversation this way: "I could have done it." "No, you couldn't." "I really could have done it, if you had come earlier." So, you should put "really" before the phrase that needs the emphasis "could have done it" - rather than in the middle of that phrase or after it. If you use the fourth option - "I could have done it, really, if you had come earlier" - it doesn't sound convincing, like you don't even believe yourself, because the "really" is sort of an afterthought.