Let $A$ be a local Artin ring, $B$ be a $A$-flat algebra and $M$ a finitely generated $B$-module and flat $A$-module. Let $k$ be the residue field of $A$ i.e., $A/m$ where $m$ is the maximal ideal of $A$. Assume that $M \otimes_B (B \otimes_A k)$ is $(B \otimes_A k)$-free finitely generated module. I think it is true that $M$ is a free $B$-module since this is an equivalent formulation of an exercise in Hartshorne. However, I am not able to prove it.
I don't think it is true. Let $A = k[x]/(x^2)$ where $k$ is a field, $B = A[y]$, and $M = B/(x)$. Then $B \otimes_A k \cong k[y]$ and $M \otimes_B B \otimes_A k \cong k[y]$. However, $M$ is not a free $B$-module.
I believe in your post you meant to say $B \otimes_A k$ is $k$-flat not $A$-flat.