Thank you for your help.

1. He will be back after a few days.
2. He was back after a few days.
-----------
In the past tense, do we have to use 'after' as in Sentence 2?

What about Sentence 1? I used 'after' instead of 'in.' Is this sentence grammatical? Do we have to substitute 'in' for 'after'?

Both sentences are fine.

In both sentences, "after" means "later than." It's not really a substitute for "in," which implies "within."