This is a simple question of the Theory of Computation. I don't know nor want the python coded interpretation of this but rather the theoretical answer of the expression. I have tried my best to figure it out and came up with the below code:
(ab+ba+bb)*. aa.(ab+ba+bb)*.aa.(ab+ba+bb)* + b*.aa.b*.aa.b*
Is it right? Am I forgetting any other case?