# Converting DFA to RE

I have been trying to solve this problem.

Convert the DFA to a regular expression.

I extracted these following equation.

$$q_1 = q_2a$$

$$q_2 = q_1a + (a+b)q_3$$

$$q_3 = q_1b + q_2a$$

Also,the solution is $$a(aa)^*+a^*b((a+b)a^*b)^*+a^*b((a+b)a^*b)^*(a+b)(aa)^*$$

Can somebody tell me how to get to this answer??