This is problem 2.44 from Introduction to the theory of computation by Michael Sipser.
If $A$ and $B$ are languages, define $A \diamond B = \{xy: x \in A \land y \in B \land |x| = |y|\}$
Show that if $A$ and $B$ are regular languages, then $A \diamond B$ is a $CFL$.
My try:
Let us define the following languages:
$$L_1 = \{ x\#y : |x| = |y| \}$$
$$L_2 = \{ x\#y : x \in A \land x\in B \}$$ $L_1$ is context-free, can be proven in a similar way to as done here
$L_2$ is concatenation of regular languages, and hence regular.
Context-free languages are closed under intersection with regular languages, and hence $L_1 \cap L_2 = \{x\#y: x \in A \land y \in B \land |x| = |y|\}$ is context free.
Let us define the homomorphism $h$ such that $h(\#)=\epsilon$ and as the identity homomorphism for all other symbols.
$h(L_1 \cap L_2)=A \diamond B$, and since Context-free languages are closed under homomorphism, we conclude the requested result.
Does my proof make sense?