My original thought for this problem was
(a+b)b*(a*+b)(λab) + (b+a)a*(b*+a)(λba)
but the problem with this is that it can't generate
abaa
So i tried to rewrite it as
(a+b)a*+b*(a*+b)(λab) + (b+a)a*+b*(b*+a)(λba)
If anyone could offer me some guidance or a push in the right direction to finding this regular expression i'd be grateful, thanks in advance.