Assume for simplicity that we're working over Abelian groups, and consider a chain complex $C$ of the form
$$
\cdots \stackrel{d_{n+1}}\longrightarrow C_n\stackrel{d_n}\longrightarrow C_{n-1}\stackrel{d_{n-1}}\longrightarrow\cdots
$$ and an Abelian group $A$, and let $A[n]$ denote the chain complex concentrated in degree $n$ with $A[n]_n = A$. Then a map $F : C \longrightarrow A[n]$ of chain complexes must satisfy that $dF(c) = F(dc)$ for all $c\in C$. Since $F$ is the same datum as a map of Abelian groups $f : C_n \to A_n$ and since $A[n]$ has trivial differential, you see that the condition is that for all $c\in C_{n+1}$, one has that $f(dc) = 0 $.
In other words, $f$ must vanish on the $n$ boundaries of $C_n$, so $f$ induces a map $\tilde f: \operatorname{coker} d_{n+1} \to A$. Thus, the functor $A\mapsto A[n]$ is actually right adjoint to the functor $(C,d) \mapsto \operatorname{coker} d_{n+1}$. You can check that $A\mapsto A[n]$ is also left adjoint to the functor $(C,d) \mapsto \ker d_n$. Thus, things are a little more complicated than what is suggested by the book.
Rotman's book on homological algebra has many typos and errors. I suggest you consult a list of errata, such as this, though I do not find this mistake there quickly scanning it. Depending on the edition, there are entire passages or proofs that have to be replaced.