Suppose that N (resp. M) is flat. Then pM⊗1:L(M)⊗AN→M⊗AN (resp. 1⊗pN:M⊗AL(N)→M⊗AN) is a homology morphism (X, p. 67, Proposition 4), hence Hi(L(M)⊗AN) (resp. Hi(M⊗AL(N))) vanishes for i>0.
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.