a) The automaton has no transitions for !a or !p. Hence, it is not total.
b) We can conclude that the said automaton only has infinite paths if there is nothing else but a. Hence we know the negation ¬Ga. The other automaton has no state variables. Hence, q is an input variable. Hence, the automaton just requires q in the first step.
The resulting formula is just a disjunction between the two findings we had about these automata.