The drawing of the automaton makes sense to me, but the transition relation is not correct. You just have the following three transitions:
!q & !next(q) & !b & a |
!q & next(q) & b |
q & next(q)
So, the above should be your transition relation, the rest is fine!