Is the FSA for that language right? Comparison between two solutions
Your FSA would not accept the string AAB or ABBBA, or any string ending with a B or starting with AB... or starting with BA... etc., all of which it should.

One of your main issue is that you don't have any B paths out of state 1, but more problematically you only have three states, when you need at least four. This is because you have 4 different possible states, so you need at least 4 states to store all of them (odd A &amp; odd B, odd A &amp; even B, even A &amp; odd B, even A &amp; even B).

Your teacher's is correct because it has essentially divided up the responsibility of checking the parity of A's and B's to different halves. That is, you're in the top half of the graph whenever the number of A's is even, and the right half of the graph whenever the number of B's is odd. This works because each additional letter added is going to either make B go from odd to even (or vice versa) or A to go from odd to even (or vice versa).