Begin with grammar$:$
$S\rightarrow ASB|\in$
$A\rightarrow aAS|a$
$B\rightarrow SbS|A|bb$
- Eliminate $\in-$productions.
- Eliminate any unit productions in the resulting grammar.
- Eliminate any useless symbols in the resulting grammar.
- Put the resulting grammar into Chomsky Normal Form.