I think this does not hold in general. My example is based on the fact that a permutation of a regular sequence need not be regular in general:
If $M$ is a flat $k[x_1,x_2, x_3]$-module then any permutation of the sequence $x_1, x_2, x_3$ will be regular on $M$, since it is regular on $k[x_1, x_2, x_3]$. Now take $R= k[x,y,z]$ and make it into a $k[x_1,x_2, x_3]$-module by mapping $x_1, x_2, x_3$ to $x-1, xy, xz$,respectively, then $x_1, x_2, x_3$ is $R$-regular, but $x_2, x_3, x_1$ is not. Hence $R$ is not flat over $k[x_1,x_2,x_3]$.
This is what I would try to do in your situation: Let $A$ be the polynomial ring and let $R$ be the other polynomial ring, so that you have a map $A\rightarrow R$, then you can test flatness by looking at localizations $A_{\mathfrak p}\rightarrow R_{\mathfrak q}$, see Lemma 10.38.19 parts (6) and (7) in https://stacks.math.columbia.edu/tag/00H9. Since $R$ and $A$ are regular, the localizations are regular and then you can test flatness by computing the dimension of the fibres (Matsumura Thm 23.1).