Let $K$ be a field, $T_i$, $T'_i$ some variables,and $I$,$J$ ideals.
Given $\varphi$, a ring homomorphism, and $\mu$ , $\mu'$ (the quotient homomorphism)
Is there a homomorphism of rings $\phi$, such that the following diagram commutes? Is it unique? I know I need to use that fact that those rings are free, but how?
$\require{AMScd} \begin{CD} K[T'_1,\ldots,T'_n] @>{\phi?}>> K[T_1,\ldots,T_m]\\ @VV\mu 'V @VV \mu V \\ K[T'_1,\ldots,T'_n] /J@>{\varphi}>> K[T_1,\ldots,T_m] /I \end{CD}$
The fact that the right column of your diagram has a polynomial ring is irrelevant. So, let's be given $K[X_1,X_2,\dots,X_n]$, an ideal $J$ thereof, a (commutative) $K$-algebra $R$, an ideal $I$ thereof and a $K$-algebra homomorphism $\varphi\colon K[X_1,X_2,\dots,X_n]/J\to R/I$.
Denoting by $\alpha\colon K[X_1,X_2,\dots,X_n]\to K[X_1,X_2,\dots,X_n]/J$ and $\beta\colon R\to R/I$ the canonical projections, we want to find a ring homomorphism $\psi\colon K[X_1,X_2,\dots,X_n]\to R$ such that $$ \beta\circ\psi=\varphi\circ\alpha $$ Such a homomorphism is determined once we assign images for $X_1,X_2,\dots,X_n$. Just take $r_i\in R$ (for $i=1,2,\dots,n$) such that $\beta(r_i)=\varphi(\alpha(X_i))$ and you're done, by declaring $\psi(X_i)=r_i$.
There is no uniqueness, because the elements $r_i$ can in general be chosen in different ways (differing by elements of $I$).