your initial state =n0
let assume it as 0... while reading 'a' going to one state forward...that implies adding 1 to previous state
while reading 'b' going to one state backward... that implies decreasing 1 to previous state...
if you have same no.of a's and b's ===> finally you are at initial position only
but you are aim is go to n5 only.....therefore you should have exactly 5 more a's than b's to reach final state... Option : B is correct