Solution (source code)

= Solution

The statement is false. Give $\mathbb C[X,Y]$ its $\mathbb C[T]$-algebra structure by
$$
T\longmapsto X+Y,
$$
and use the quotient maps
$$
\mathbb C[X,Y]\longrightarrow\mathbb C[X],\quad Y\longmapsto0,
\qquad
\mathbb C[X,Y]\longrightarrow\mathbb C[Y],\quad X\longmapsto0.
$$
The induced maps send $T$ to $X$ and $Y$, respectively, so both polynomial rings are free of rank one, hence <flat modules>, over $\mathbb C[T]$.

Their tensor product over the middle ring is
$$
\mathbb C[X]\otimes_{\mathbb C[X,Y]}\mathbb C[Y]
\cong\mathbb C[X,Y]/(X,Y)
\cong\mathbb C.
$$
Here $T$ acts by zero, so this is the torsion module $\mathbb C[T]/(T)$. It is not flat: tensoring the injection $\mathbb C[T]\xrightarrow{\,T\,}\mathbb C[T]$ with it produces the zero map on a nonzero module.