This is a cross-post from math.stackexchange, since I didn't get any answers there.
As far as I know, for $R,S,V,W$ rings and $M$ an $(R,W)$-bimodule, $N$ an $(R,S)$-bimodule and $L$ an $(S,V)$-bimodule, we have an isomorphism in $D(V$-lmod$)$ $$ \text{RHom}_R(N \otimes_S^L L, M) \cong \text{RHom}_S(L,\text{RHom}_R(N,M)). $$
The only proof I can imagine would take flat / injective resolutions $P^\bullet$ and $Q^\bullet$ of $N$ and $M$ to yield $$ \text{Hom}^\bullet_R(P^\bullet \otimes_S L, Q^\bullet) \cong \text{Hom}^\bullet_S(L,\text{Hom}^\bullet_R(P^\bullet,Q^\bullet)). $$ However, it is not clear to me why there exists a resolution of $N$ consisting of $(R,S)$-bimodules that are flat right-$S$-modules. For instance let $S=\mathbb Z$, $R = \mathbb Z/p$, in which case all flat $S$-modules are torsion free, so none of them can have an $R$-module structure.
Does the 'derived adjunction' still hold? If yes, how do you prove it? I would prefer a constructive proof which allows me to understand the map.