Let $R$ be a unital commutative ring. Suppose that for the $\mathbb{Z}$-graded $R$-modules $V$ and $W$, $(V,d)$ and $(W,d)$ are chain complexes. Let $\text{Hom}(V,W)$ be the module of homogeneous morphisms of degree $i$ from $V$ to $W$. If $f$ is of degree $i$ then $ f \in \text{Hom}^i(V,W)$ and we denote $|f|:=i$. I want to check well-definedness and the condition $d^2=0$ for the following map that endows $\text{Hom}(V,W)$ with a chain complex structure.
For all $f \in \text{Hom}(V,W)$ define $$df:=d\circ f-(-1)^{|f|}f\circ d.$$
For well-definedness, I choose $f_{i+1} \in \text{Hom}^{i+1}(V,W)$ and check if $df_{i+1}$ is indeed an element of $\text{Hom}^{i}(V,W)$. By definition this holds if and only if $df_{i+1}(V^k)\subseteq W^{k+i}$ for all $k$ in the integers. By definition $f_{i+1}(V^k)\subseteq W^{k+i+1}$, so now I would like to use the fact that $d$ is of degree $-1$ by hypothesis. Then it would be clear that $df_{i+1}(V^k)\subseteq W^{k+i}$.
Now, in my notes the definition of $df$ is kind of implicit, so my question is what map exactly do we apply to $f_{i+1}$? Is it $d_{i+1}$, so that we have $df:=d_{i+1}\circ f_{i+1}-(-1)^{i+1}f_{i+1}\circ d_{i+1}$ ? In that case we would have the problem that $df_{i+1}(V^k)\subseteq W^{k+i}$ should hold for every integer $k$ and $d_{i+1}$ is not defined for values in $W^{k+i+1}$ if $k\neq 0$. From what I understand, we need to apply $d$ as a map from $V$ to $W$ for it to hold for all $k$. Does the chain then look as follows?
$$ ... \xleftarrow{d} \text{Hom}^{i-1}(V,W) \xleftarrow{d} \text{Hom}^{i}(V,W) \xleftarrow{d} \text{Hom}^{i+1}(V,W) \xleftarrow{d} ...$$
If so, then my confusion stems from the fact that the map $d$ is dependent on the choice of $k$. How could we write down $df$ explicitly?
I would be glad if someone could clear up my confusion.
I'm sorry for the duplicate of my question, I have found advice in Hom cochain complex of two chain complexes. However, I will write it down explicitly. The map $f_{i+1}$ is sent to a map $df_{i+1}$ such that for $k$ in $\mathbb{Z}$ we have $df_{i+1}(V^k):= d_{k+i+1}\circ f_{i+1}(V^k) - (-1)^{i+1} f_{i+1}\circ d_k(V^k) $. One can easily check that this is well defined and that $df_{i+1}(V^k) \subseteq W^{k+i}$, i.e. an element of $\text{Hom}^{i}(V,W)$. Namely
$$f_{i+1}(V^k)\subseteq W^{k+i+1} \Rightarrow d_{k+i+1}\circ f_{i+1}(V^k) \subseteq W^{k+i} $$ and similarly $$d_k(V^k) \subseteq V^{k-1} \Rightarrow f_{i+1}\circ d_k(V^k) \subseteq W^{k-1+i+1}=W^{k+i}$$ and by the module structure on $\text{Hom}^{i}(V,W)$, the sum of both maps is in $\text{Hom}^{i}(V,W)$.