Context free grammar for $A \circ B$
Suppose that DFA for $A$ and $B$ are $D_A$ and $D_B$ respectively.
We will construct a PushDown Automata (PDA) for the given language $A \cdot B$ by combining $D_A$ and $D_B$ in a particular manner.
Modify the transitions of $D_A$ such that on reading any letter it pushes a symbol $X$ on the stack. Join all the final states of $D_A$ to the initial state of $D_B$ with epsilon transitions. Modify all the transitions of $D_B$ to Pop $X$ from the stack. Accepting condition will be that on reading a word we should reach one of the final state of $D_B$ and the stack should be empty.
It will be quite easy for you to convince yourself that this will accept the language $A \cdot B$ as required. Now, we can apply the standard method to convert the PDA to grammar to get the required grammar.