Unable to get a terminal at the start for the GNF The grammar is:
S-> AA|a
A-> SA|b

If I substitute one rule in another, there would always remain a non-terminal at the start. How do I get the terminal at the start?
GNF has productions of form:
A->xB

Where x is a single terminal and B can be a combination of non-terminals.
 A: To transform a grammar in GNF you have to remove direct and indirect left recursion. here you have indirect left recursion so the strategy is to make it direct by replacing the first $A$ in the rule of $S$. You obtain the following equivalent grammar:
$$S\to SAA|bA|a $$
$$A\to SA | b $$
You now have a direct recursions $S\to SAA$ so you add a new nonterminal $S'$ and transform the rule for $S$ in:
$$ S\to bAS'|aS'$$ and $$S'\to AAS'|\epsilon $$
Replacing the new $S$ in the rule for $A$ you get
$$ A\to bAS'A|aS'A|b $$
Now replacing the first $A$ in the rule of $S'$ you get
$$S'\to bAS'AAS'|aS'AAS'|bAS'|\epsilon $$
Thus you get the grammar:
$$ S\to bAS'|aS'$$
 $$S'\to bAS'AAS'|aS'AAS'|bAS'|\epsilon $$
$$ A\to bAS'A|aS'A|b $$
Now you only need to suppress the $S'\to epsilon$ by replacing the rules where $S'$ appear by the combination of the same rule but where $S'$ is present or not thus you get
$$ S\to bAS'|aS'|bA|a$$
 $$S'\to bAS'AAS'|aS'AAS'|bAS'|bAS'AA|aS'AA|bA|bAAAS'|aAAS' |bAAA|aAA|bA$$
$$ A\to bAS'A|aS'A|b|bAA|aA $$
