Given regular languages $L$, $M$. Is $K=\{uw | u,w \in \Sigma^*,(\exists v \in M) uvw \in L\}$ necessarily regular?
The most direct method to solve the problem is to show to build, starting with finite state automata $A_L$ and $A_M$ for the regular languages $L,M$, a new automaton for the new language $K$ which is constructed from $L$ and $M$.

For this you need an idea, a formal construction, and (if you are not convinced) a proof the construction is correct. 

The idea can be as follows. If the automaton $A_L$ follows a path on a word, one should be able to decompose this in the form $uvw$ in such a way that the subword $v$ can be accepted by $A_M$. The middle part $v$ should be made invisible in the new automaton for $K$. This idea can be made formal using concepts from finite automata like $\varepsilon$-instructions and direct product construction.

If you have knowledge of other closure properties then the one from this exercise can be deduced. Closure properties you then need are intersection, morphism and inverse morphism.

Enjoy.