Regular languages- homomorphism. Let $h: \{ a,b,c,d \}^* \rightarrow \{a,b\}^* $ be a homomorphism such, that
$h(a) = aa, h(b) = ab, h(c) = ba, h(d) = b $ . Determine:
$h^{-1}((bab)^*ba^*b).$
I have trying do it by 4 hours. I don't have idea. I observed, what is obvious, that:
$h^{-1}(bab)^*= (db)^*$
Please help me! 
 A: As MJD points out in a comment, we have
$$h^{-1}(bab)^*=(db+cd)^*$$
which can be proven noting that two consecutive $b$'s must not be "generated" by the same element of $\{a,b,c,d\}^*$, since none of the images of those elements has consecutive $b$'s. Thus, we can factor, for instance
$$h^{-1}(babbab)=h^{-1}(bab)h^{-1}(bab)$$
and then we just note that $h^{-1}(bab)=(db+cd)$ and apply the above factoring inductively. We can similarly factor
$$h^{-1}((bab)^*ba^*b)=h^{-1}(bab)^*h^{-1}(ba^*b)$$
$$h^{-1}((bab)^*ba^*b)=(db+cd)^*h^{-1}(ba^*b)$$
so we just need to figure out that last term; I don't see any easy way to do this beyond splitting into cases; if $X$ is a string such that $h(X)$ matches $ba^*b$, then it's clear that $X$ starts either with $c$ or $d$, followed by a string $Y$ with $h(Y)$ matching $a^*b$ - this gives us:
$$h^{-1}((bab)^*ba^*b)=(db+cd)^*(c+d)h^{-1}(a^*b)$$
where the last term of possible strings $Y$ clearly ends with either $b$ or $d$ and can have as many $a$'s preceding it as desired. This yields
$$h^{-1}((bab)^*ba^*b)=(db+cd)^*(c+d)a^*(b+d)$$
