You've already been given a method for surjectivity, so I'll try to explain a different general method for this problem which should help explain part (b).
As the other answer explained, a map out of $R^n$ is the same as defining where the basis vectors $e_i$ go. In other words, there is an isomorphism $Hom_R(R^n, M) \cong M^n$ sending $f \mapsto (f(e_i))_i$. This is, in fact, "natural". In other words, the following diagram commutes for any map $f: M \rightarrow N$.

where the vertical maps are the isomorphisms I described before. Sorry for the poor typesetting, I'll try to improve it when I can.
Anyway, this tells us that the sequence you gave is isomorphic to
$$
0 \rightarrow M_1^n \xrightarrow{f^n} M_2^n \xrightarrow{g^n} M_3^n \rightarrow 0.
$$
Exactness of this sequence is more easily checked.
For part (b), one would hope to do the same thing. However, it's not in general true that $Hom_R(R^\Delta, M) \cong M^\Delta$ naturally for $\Delta$ infinite. We'd have to replace $R^\Delta$ with $\bigoplus_{d \in \Delta} R$, the free $R$-module on $\Delta$. For ease of notation I'll call this $R^{\oplus \Delta}$. This is defined as $\{a \in R^\Delta : \text{ all but finitely many } a_d = 0\}$. Observe that this is just $R^\Delta$ for $\Delta$ finite. It turns out $Hom_R(R^{\oplus \Delta}, M) \cong M^\Delta$ naturally. You can then apply similar reasoning to prove this.
To get to the question you asked, the answer is that the sequence need not be exact. It will always be exact in the places you've already checked, but surjectivity can fail. The key notion here is projective modules. An $R$ module $P$ is said to be projective if $Hom_R(P, -)$ preserves exact sequences. It turns out that all modules preserve the left part of the exact sequence, so projectivity is equivalent to preserving the surjectivity part. The discussion above, by the way, leads to the result that arbitrary direct sums of $R$ are projective. However, it is not the case that all products of $R$ are projective. In fact, $\mathbb Z^{\mathbb N}$ is not projective. I'm not sure of an easy way to prove this, but as $\mathbb Z$ is a PID, it suffices to show that $\mathbb Z^{\mathbb N}$ is not free (i.e. isomorphic to a direct sum of copies of $\mathbb Z$). This isn't the easiest result, and is proven here.