I'm reading the proof for Rotman's theorem 3.40, the proof is below

Now, I understand everything until the commutative diagram. Since he didn't label his maps, from the context, I'm guessing that the first two vertical isomorphism between sums are induced by the isomorphism of $FG(P) \cong P$ and the third vertical map is the natural transformation from $FG \to 1_R$.
My question is with the maps above, how do you know the second square on the right is commutative??
The only way I can see the second square being commutative is if the middle vertical map is also a natural transformation from $FG \to 1_R$, but if that is the case, we don't know if that map is an isomorphism though??
I feel like there is something small that I missed. Thank you!

We have that the functors $F:{}_S\operatorname{Mod} \rightarrow \operatorname{Mod}_R, M \mapsto P \otimes_S M$ and $G:\operatorname{Mod}_R \rightarrow {}_S\operatorname{Mod}, N \mapsto \operatorname{Hom}_R(P,N)$ are adjoint. I would guess that the components of the counit of the adjunction (ie of the associated natural transformation $\varepsilon: FG \Rightarrow 1_{\operatorname{Mod}_R}$) are given by the assignment $$\begin{array}{rcl} FG(N) = P \otimes_S \operatorname{Hom}_R(P,N) &\overset{\varepsilon_N}{\rightarrow}&N\\ p \otimes f & \mapsto & f(p) \end{array}$$ which should be the result of the exercise. Now in the case of $N = P$ this is indeed the isomorphism $P \otimes_S S \cong P$.
Now as $F$ is left adjoint and $P$ is projective, both $F$ and $G$ and hence $FG$ is right exact. This means that given a diagram $D:I \rightarrow \operatorname{Mod}_R$ the morphism $\operatorname{colim} FGD(i) \rightarrow FG(\operatorname{colim} D(i))$ induced by the inclusions $FG(\iota_i)$ is an isomorphism.
Now consider the diagram $$\begin{array}{ccccccc} \coprod_I P & \rightarrow & \coprod_J P &\rightarrow & N &\rightarrow 0\\ \uparrow\alpha && \uparrow\alpha‘ && \uparrow&&||\\ FG(\coprod_I P) & \rightarrow & FG(\coprod_J P) & \rightarrow & FG(N) & \rightarrow 0\\ \uparrow\beta&&\uparrow\beta‘&&\uparrow\\ \coprod_I FG(P) & \overset{\phi}{\rightarrow} & \coprod_J FG(P) & \rightarrow& FG(N)& \rightarrow 0\\ \end{array}$$ Where the $\alpha$s are the components of the counit $\varepsilon$ at coproducts of $P$ and the $\beta$s are the morphisms induced as above. $\phi$ and $\psi$ are chosen such that the diagram commutes. It remains to check that the composition $\alpha\beta$ is the coproduct of the components of $\varepsilon$ at $P$, since coproducts of isos are isos and $\beta$ is iso aswell, so $\alpha$ will be iso.
For any index $i$ and inclusions $\iota_i: P \rightarrow \coprod_I P$ and $\kappa_i: FG(P) \rightarrow \coprod_I FG(P)$ the diagram $$\begin{array}{ccccc} \coprod FG(P) &\rightarrow &FG(\coprod P) &\overset{\varepsilon_{\coprod P}}{\rightarrow} &\coprod P\\ \kappa_i\uparrow&&FG(\iota_i)\uparrow&&\iota_i\uparrow\\ FG(P) &=& FG(P) &\overset{\varepsilon_P}{\rightarrow}&P \end{array}$$ commutes (the left square does because the top arrow is the one induced by the $FG(\iota_i)$ and the right square does by naturality of $\varepsilon$). This shows that $\alpha\beta = \coprod \varepsilon_P$.