What is the grammar for language $L={a^nb^m : n \neq m-1}$? What is the grammar for language $L = \{ a^nb^m : n\neq m-1\}$? 

I only know I have to write grammar for both $ n&lt;m-1 $ and $ n&gt;m-1 $, so this is what I wrote:

for n&lt;m-1
S-&gt;Abb
A-&gt;aAb|lambda

for n&gt;m-1
S-&gt;aaA
A-&gt;aAb|lambda


Yet I can not mix them and get a correct grammer for it.
If you split the grammar into two parts for disjoint parts of the language you better take different names for the variables, since they have a different meaning in the two parts.