Hom and tensor with a flat module Let $A$ be a commutative noetherian ring. Let $M, N$ be $A$-modules, and assume that $M$ is finite over $A$. Let $P$ be a flat $A$-module.
Is it true that there is an isomorphism
$\operatorname{Hom}_A(M,N)\otimes_A P \cong \operatorname{Hom}_A(M,N\otimes_A P)$ ?
It appears that it holds at least locally (that is, when $P$ is free). Is it true in general?
If so, is there a reference for this?
Thank you!
 A: Here is   sufficient condition for obtaining the isomorphism you are after.
Let $A$ be an arbitrary commutative ring (not supposed noetherian)  and  $M, N$   arbitrary modules . We have a canonical morphism
     $$ M^*\otimes_A N\to Hom (M,N):\phi \otimes n \mapsto [m\mapsto\phi(m)n]  \quad (\star)$$ 
Proposition ($\star$) is an isomorphism as soon as $M$ is finitely generated projective.
Proof:
 It is an isomorphism for $M=A$, then for  finitely generated  free modules $M=A^r$, and finally for  summands of such i.e. finitely generated projectives.    
Corollary:
Given three arbitrary modules $M,N,P$ over the commutative ring $A$ , with $M $  finitely generated projective, we have a natural isomorphism
$$Hom_A(M,N)\otimes_A P \cong Hom_A(M,N\otimes_A P)$$
Proof:
 Replace all $Hom$'s by $\otimes$'s and use associativity of tensor product.       
Edit:
a) The Corollary fails if $P$  is finitely generated but not projective.
Take for example $A=\mathbb Z, N=\mathbb Z, M=P=\mathbb Z/(2)$.
 Then the left-hand side in the Corollary is $0$ and the right-hand side is    $\mathbb Z/(2)$    
b) As QiL pertinently comments, the Corollary also fails if $P$ is not assumed finitely generated.
Take for example $N=A$ and $M=P=$ an arbitrary non finitely generated module.
Then our canonical  morphism $u: M^*\otimes M \to Hom(M,M)$    cannot be surjective.
  Indeed any element $t\in  M^*\otimes M$ gets sent to an endomorphism $u(t)=f:M\to M$  such that $u(M)$ is finitely generated,  so that the identity $Id_M$ of $M$ will never be in  the image of $u$.  
A: Yes it is true for general flat modules $P$. We have a canonical map 
$$ \rho_M : \mathrm{Hom}_A(M, N)\otimes_A P\to \mathrm{Hom}_A(M, N\otimes_A P)$$ 
(it maps $\varphi \otimes p$ to the map $x\mapsto \varphi(x)\otimes p$). Write $M$ as the quotient of a free finite rank $A$-module $L$. Then we have an exact sequence 
\begin{equation} 
0 \to \mathrm{Hom}_A(M, N)\to \mathrm{Hom}_A(L, N) \to \mathrm{Hom}_A(K, N) 
\end{equation} 
where $K$ is the kernel of $L\to M$. Tensoring by $P$, we get 
$$ 
0 \to \mathrm{Hom}_A(M, N)\otimes_A P \to \mathrm{Hom}_A(L, N)\otimes_A P \to \mathrm{Hom}_A(K, N) \otimes_A P.
$$ 
Similarly, replacing $N$ with $N\otimes_A P$, we have an exact sequence
$$ 
0 \to \mathrm{Hom}_A(M, N\otimes_A P) \to \mathrm{Hom}_A(L, N\otimes_A P) \to \mathrm{Hom}_A(K, N\otimes_A P)
$$ 
and we have a commutative diagram with the above two lines and vertical maps $\rho_M$, $\rho_L$ and $\rho_K$. As $L\simeq A^d$, it is easy to see that $\rho_L$ is an isomorphism. Therefore $\rho_M$ is injective. As $A$ is noetherian, $K$ is finitely generated over $A$, the previous result applies to $K$ and $\rho_K$ is injective. Now coming back to our commutative diagram, it is easy to see that $\rho_M$ is then surjective.
