Exercise 2.13 in Atiyah-Macdonald 
Let $f \colon A \to B$ be a ring homomorphism, and let $N$ be a $B$-module. Regarding $N$ as an $A$-module by restriction of scalars, form the $B$-module $N_B = B \otimes_A N$. Show that the homomorphism $g \colon N \to N_B$ which maps $y$ to $1 \otimes y$ is injective and that $g (N)$ is a direct summand of $N_B$.
  [Define $p \colon N_B \to N$ by $p (b \otimes y) = by$, and show that $N_B = \operatorname{Im} (g) \oplus \operatorname{Ker} (p)$.]

My idea was to define an isomorphism
\begin{align*}
\phi \colon N_B & \to \operatorname{Im} (g) \oplus \operatorname{Ker} (p) \\
b \otimes y & \mapsto (p (b \otimes y), b \otimes y - 1 \otimes (g \circ p) (b \otimes y))
\end{align*}
It's easy to check that $\phi$ is injective and surjective. If I take the $B$-module structure of $N_B$ to be
$$
b' . (b \otimes y) = (b'b) \otimes y
$$
I only manage to show that $\phi$ is a homomorphism of $A$-modules, because $g$ seems to be only a homomorphism of $A$-modules:
$$
b.g(y) = b.(1 \otimes y) = b \otimes y \neq 1 \otimes (b.y) = g (b.y)
$$
(where $\neq$ means "not equal in general").
However, the way the question is phrased seems to suggest that the isomorphism should be one of $B$-modules.
Should I take the $B$-module structure of $N_B$ to be something else, for example
$$
b'.(b \otimes y) = b \otimes (b'.y)
$$
or should I show the result only for $A$-modules?
I've been confusing myself about this issue of "as $A$-module" or "as $B$-module" and would appreciate if someone could clarify. (I also wonder if, since homomorphisms are only fancy functions of sets, it somehow doesn't matter.)
 A: Recall that $g(N)$ is a direct summand of $N_B$, if it is a submodule of $N_B$ and there exists a direct complement $M \leq N_B$ such that $g(N) \oplus M = N_B$. Thus it should be mentioned whether $g(N)$ is a direct summand of $N_B$ as $A$-modules or $B$-modules.
As you pointed out, $g \colon N \ni y \mapsto 1 \otimes y \in N_B$ is not a homomorphism of $B$-modules in general. For example, let $A=\mathbb{R}$, $B=N=\mathbb{C}$ and $f$ be the inclusion. Then we get $i \otimes 1 \neq 1 \otimes i$ in $\mathbb{C} \otimes _ \mathbb{R} \mathbb{C}$. Moreover, here $g(N)$ is not a direct summand of $N_B$ as $B$-modules, since $g(N)=g(\mathbb{C} \otimes_\mathbb{R} \mathbb{C})$ is not a $B$-submodule of $N_B$. To see this, note that $\mathbb{C} \otimes _\mathbb{R} \mathbb{C} \cong \mathbb{C} \times \mathbb{C}$ as $\mathbb{C}$-modules via $ x \otimes y \mapsto (xy, x \bar{y})$. Under this identification, $g(N)$ is isomorphic (as $\mathbb{R}$-modules) to $\{(y, \bar{y}):y \in \mathbb{C} \} \leq \mathbb{C} \times \mathbb{C}$, which is not a $\mathbb{C}$-submodule. 
Here is my approach: It is easy to show $g$ and $p$ are $A$-module homomorphisms satisfying $p \circ g = id_N$. In particular, $g$ is injective. Now consider the short exact sequence of $A$-modules: $$ 0 \longrightarrow N \overset{g}\longrightarrow N_B \longrightarrow N_B/g(N) \longrightarrow 0 $$
Since $p$ is a left inverse of $g$, this exact sequence splits. Hence $N_B = \ker(p) \oplus \text{im} (g)$ as $A$-modules.
