Let $\phi_1(x)=4x$ mod $16$
Let $\phi_2(x)=4x$ mod $24$
Even though
$\phi_1(a+b) = 4(a+b)$ mod $16$ = $4a + 4b$ mod $16 = \phi_1(a) + \phi_1(b)$
it is not true that
$\phi_2(a+b) = 4(a+b)$ mod $24$ = $4a + 4b$ mod $24 = \phi_2(a) + \phi_2(b)$ because $\phi_2(12+12)=\phi_2(8)=8$ but $\phi_2(12)+\phi_2(12)=0+0=0$.
Obviously, something in the proof is wrong (if it weren't, every mod group would be homomorphic to every other mod group which is clearly false), but I can't figure out what
The issue is not the group homomorphism property, $\phi_2$ is not well defined as a function.
The definition of $\phi_2$ is using some element $x$ from its class $\pmod{16}$. In this case, in order for this to be a function, you need to show it is independent of the choice of $x$ in the class.
Note that this is always a potential issue when defining $f(x \pmod{n})$ as an expression $E(x)$ in $x$, you need to make sure that if $x \equiv y \pmod{n}$ then $E(x)=E(y)$...This holds for $\phi_1$ but not for $\phi_2$.