"Relatively free" functors have been considered at least since the time of Lawvere's thesis; see for example page 111 of 122 for the case involving finitary algebraic theories.
I don't know where this is written down, but the following construction is pretty general and might suit your purposes. Let $\theta: S \to T$ be a morphism of monads on a category $C$, and suppose that the category of algebras $C^T$ has coequalizers (as happens if for example $C= Set$). Then the forgetful functor
$$C^T \to C^S,$$
which takes a $T$-algebra $(d, \alpha: Td \to d)$ to the $S$-algebra
$$Sd \stackrel{\theta d}{\to} Td \stackrel{\alpha}{\to} d,$$
has a left adjoint. This gives the factorization in the evident case where $\mathcal{A} = C$, $\mathcal{B} = C^S$, and $\mathcal{C} = C^T$.
The left adjoint takes an $S$-algebra $(c, \xi: Sc \to c)$ to the coequalizer of the pair of arrows in $C^T$:
$$T\xi: TSc \to Tc, \qquad TSc \stackrel{T\theta c}{\to} TTC \stackrel{mc}{\to} Tc,$$
where $m: TT \to T$ is the multiplication on $T$. This coequalizer might be written $T \circ_S c$, by analogy with the coequalizer $B \otimes_A M$ where $B$ is an algebra over $A$ and $M$ is an $A$-module.
That this is the left adjoint is a slightly lengthy diagram chase which I can produce if desired. (I think I may have written this up in the nLab somewhere, but just now I can't access the nLab. It might be at a page on algebras over a monad, or on free algebras. If it's not there, I should record the detailed proof at the Lab when I get a chance.)
Edit: I wrote up something quickly here at the nLab, which has a detailed (somewhat pedestrian) proof of the adjunction stated above.