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.)