Suppose that M1=(Q,Σ,δ,q0,F1)M1=(Q,Σ,δ,q0,F1) is the DFA which accepts L1L1. Then a DFA which accepts L2L2 is M2=(Q,Σ,δ,q0,F2)M2=(Q,Σ,δ,q0,F2), where:
F2={q∈Q:∃x∈L2.δ(q,x)∈F1}F2={q∈Q:∃x∈L2.δ(q,x)∈F1}
Now here’s the caveat: this proof sketch is not constructive! To turn this into an algorithm requires some way to enumerate or recognise strings in L2L2, and remember, L2L2 can be anylanguage.
If L1L1 is context free and L2L2 is regular, L1/L2L1/L2 is always context-free (proof left as an exercise), but it is not necessarily regular. (To see why, consider L2={ϵ}L2={ϵ}.)
EDIT I’ve just noticed that the definition in the question is different from the usual definition of “right quotient”. The usual definition is:
A/B={x∈Σ∗:∃y∈B.xy∈A}A/B={x∈Σ∗:∃y∈B.xy∈A}
The definition in the question is:
A÷B={x∈Σ∗:∀y∈B.xy∈A}A÷B={x∈Σ∗:∀y∈B.xy∈A}
My answer us for the usual definition, because these are standard results. The answers are similar for the definition in the question, except that the construction is slightly different. (See David Smith’s comment.)