According to the diagram showed in the answer section, question is asking what should be the input such that next output will be same as current output. We call it latch mode. We can clearly see from diagram there are two self loops of 1 on A and 1 on B. So to get a stable output we need 1 on A and 1 on B. hence it can be given by a OR b i.e a+b.