Here's a restatement of what's going on here: we have a function $\varphi(n)=n+5$ from $\mathbb{Z}$ to itself and want to check that $n*m=\varphi(n+m)$ is also a group structure. So, it may leave the waters less muddy if we state the problem more generally: given a set $S$ with a group structure $(*,e)$ and a function $\varphi:S\to S,$ when is the function $*':(s,t)\mapsto \varphi(s*t)$ also a group operation on $S$?
Well, a group needs an identity. An identity for our possible operation $*'$ would be $e'\in S$ such that $s*e'=e'*s=\varphi^{-1}(s)$ for every $s\in S$. So $\varphi$ had better be a bijection. Considering $s=e$ shows $e'$ could only be $\varphi^{-1}(e)$. We've also shown that $e'$ has to be in the center of $S$, that is, commute with all $s\in S$. To narrow down what $\varphi$ looks like even further, compute $\varphi(a)=\varphi(ae'^{-1}e')=\varphi(\varphi^{-1}(ae'^{-1}))=ae'^{-1}$. So $\varphi$ is just right multiplication by $e'^{-1}$ (equivalently, left multiplication, since $e'$ is in the center of $S$).
So we've seen it's necessary for $*'$ to be a group operation that $\varphi$ be multiplication by an element of the center of $S$. That's actually all we need: let's check. We already required $e'$ was an identity for $*'$ when we introduced it. How about inverses? Given $s$ we want $t$ so that $s*'t=s*t*e'^{-1}=e'=t*s*e'^{-1}=t*'s$. This yields $t=s^{-1}*e'*e'=e'*s^{-1}*e'$. These two expressions for $t$ are equal since $e'$ is in the center of $S$ and determine $t$ uniquely as the inverse of $s$ for $*'$. Finally for associativity we must have
$$(r*'s)*'t=(r*s*e'^{-1})*'t=r*s*e'^{-1}*t*e'^{-1}=r*s*t*e'^{-1}*e'^{-1}=r*'(s*t*e'^{-1})=r*'(s*'t)$$
And we're saved yet again by the condition that $e'$ be central, which makes the third equality hold.
So we've seen that the functions $\varphi:S\to S$ such that $\varphi(s*t)$ is a group multiplication are exactly those given by multiplication by elements of the center of $S$.