I have a problem matching the definition of a hom-functor (from nlab) with how this concept it used in the definition of adjunction (from nlab):
The hom-functor is defined on $C^{\text{op}}\times C$, but the definition of adjunction requires $C^{\text{op}}\times D$ - and it seems I can't just replace $C$ with $D$ in the definition of a hom-functor, as then the composition "$g \circ q \circ f$" won't work, as $g$ is an arrow from $D$ and $f$ is an arrow from $C$ and composition of arrows between different categories is, as far as I know (just started to learn), undefined.
[This question came to me after preliminarily understanding the definition of adjunctions, as it was explained in a different question of mine.]
Note that $L\colon C \to D$ and $R \colon D \to C$ are adjoint if $$ \def\h{\mathop{\rm Hom}\nolimits} \h_D\bigl(L(-), -\bigr) \cong \h_C\bigl(-, R(-)\bigr) $$ Now $\h_D$ is a functor $\def\o{\mathrm{op}}D^\o \times D \to \def\S{\mathsf{Set}}\S$, that is the composition with $L$ is a functor $\h_D\bigl(L(-), -\bigr) \colon C^\o \times D \to \S$ ($L$ maps from $C$ to $D$), the right hand side works analogously, we have $\h_C\bigl(-, R(-)\bigr) \colon C^\o \times D \to \S$, as $\h_C \colon C^\o \times C \to \S$.