# How to remove null production from context free grammar?

How to remove null production and simply the grammar?

$$S \to a \mid Ab \mid aBa \\ A \to b \mid \epsilon \\ B \to b \mid A$$

Can the simplification result in this CFG?

$$S \to a \mid aBa \\ A \to b \\ B \to b$$

Your simplification is wrong. The language of the first grammar includes $$b$$, but the one of the second grammar does not.
If you replace the definition of $$A$$ in the productions of $$B$$ you obtain $$B \to b \mid \epsilon$$. Then if you replace $$A$$ and $$B$$ with their definition in $$S$$ you have.
$$S \to a \mid bb \mid b \mid aba \mid aa$$