So I've been scratching my head over this problem for a couple of days now. Given some language $A$ and $B$ that is regular, show that the language $L$ which consists of all strings in $A$ whose length is equal to some string in $B$ is a regular language.
In equation form:
$$L = \{x \in A \mid \exists y \in B \text{ s.t. } |x| = |y| \}$$
My initial thought was to try and come up with some DFA for both languages $A$ and $B$ and map the two states to each other and hopefully get a 1:1 ratio that way I can generate a new DFA which proves that $L$ is regular. But then I realized that $A$ and $B$ don't have to be over the same set of symbols.
I think the correct way to solve this is to use the closure properties of regular language, but I'm not sure of how to begin/use the properties for "lengths" of strings instead of strings themselves.
Could someone point me in the right direction?