It seems like you're concentrating on reported speech. As Clive says,
earlier is most likely the word you want to replace
ago when you backshift the tenses.
Examples:
James said, "Henry left two hours ago." James said that Henry had left two hours earlier.
Ken said, "Frieda bought a new car two weeks ago. " Ken said that Frieda had bought a new car two weeks earlier.
before and previously are also sometimes used. Personally, I don't find them as good.
CJ