Why is $\operatorname{Hom}(A, B)$ an abelian group? Can someone please explain why a Hom-set (the set of all morphisms between two abelian groups $A$ and $B$) does also form an abelian group with addition? By the way both groups $A$ and $B$ have the same operation "$\cdot$".
Edit:  Yeah I've tried but: If $f$ and $g$ are morphisms between $(A,\cdot)$ and $(B,\cdot)$ then the result should still be a morphism from $(A,\cdot)$ to $(B,\cdot)$ right? (If the conclusion is true?) So the new $h=f+g$, which should be a morphism should respect $h(x\cdot y)=h(x)\cdot h(y)$ which adds up to:
$$f(xy)+g(xy)=f(x)g(x)+f(y)g(y)+f(x)g(y)+f(y)g(x)$$
which means that $f(y)g(x)+f(x)g(y)$ is $0$ and I can't explain that.
 A: First a bit of housekeeping.
Abelian groups are best viewed as possessing a notion of addition $+$, a notion of unary negation $-$, and notion of zero $0$. Thus, if $X$ and $Y$ are abelian groups, a good definition of "homomorphism" $X \rightarrow Y$ is that its a function $f : X \rightarrow Y$ satisfying the following identities.


*

*$f(0_X) = 0_Y$

*$f(-x) = -f(x)$

*$f(x+x')=f(x)+f(x')$


You can then show from the axioms (which I will not list here, since they aren't very relevant, except insofar as they're all identities, and they entail the four very important identities listed below) that if $X$ and $Y$ are abelian groups and $f : X \rightarrow Y$ is a function, then condition 3 above suffices to conclude both 1 and 2. This simplifies what comes next; but isn't strictly necessary. I suggest that, for this particular problem, you pretend that all 3 identities above need to be demonstrated before we may conclude that $f$ is a homomorphism of Abelian groups, since you'll get a higher quality of insight.
Anyway, in this way we recover the usual definition of "homomorphism of Abelian groups," which from the viewpoint of universal algebra more like a characterization than an actual definition.
Now to answer your question.
The deeper reason that $\mathrm{Hom}(X,Y)$ forms an Abelian group is because the theory of Abelian groups is a commutative algebraic theory. This is a concept that deserves to be better known.
Concretely, this means the following four identities are either axioms of Abelian group theory, or they're entailed by the axioms.


*

*$-0 = 0$.

*$0+0 = 0$.

*$-(x+y) = (-x)+(-y)$.

*$(x+y)+(x'+y')=(x+x')+(y+y')$.


For your interest, the fourth identity is called mediality.
Anyway, the point is that using (just) these four observations, we can show the following:

For all abelian groups $X$ and $Y$, the following sentences hold.
  
  
*
  
*The unique function $0_{XY} : X \rightarrow Y$ that always returns $0_Y$ is a homomorphism.
  
*Given a homomorphism $f : X \rightarrow Y$, the function $-f : X \rightarrow Y$ is a homomorphism.
  
*Given a pair of homomorphisms $f,g : X \rightarrow Y,$ we have that $f+g$ is a homomorphism.
  

Thus $\mathrm{Hom}(X,Y)$ is closed under the operations induced by $Y$. Now the set of all functions $X \rightarrow Y$ is an abelian group under the operations induced by $Y$ (this is because abelian groups can be axiomatized by identities), and thus every subset of set of all functions $X \rightarrow Y$ that is closed under the induced operations is itself an abelian group (again, because abelian groups can be axiomatized by identities). In particular, we deduce that $\mathrm{Hom}(X,Y)$ is an abelian group with respect to these operations.
That's pretty much it; but feel free to comment if you have any questions.

By the way, if you're wondering where the 4 identities listed in the body of the answer come from, they come from a 3x3 grid of identities (3 because Abelian groups are equipped with three functions; a binary function +, a unary function -, and a nullary function 0). The aforementioned 3x3 grid gives rise 9 identities, listed below for your convenience. Removing the trivial ones and the redundancies, we obtain the 4 listed in the body of my answer.
1. 0 commutes with 0 : 0 = 0
2. 0 commutes with - : -0 = 0.
3. 0 commutes with + : 0+0 = 0.
4. - commutes with 0 : -0 = 0.
5. - commutes with - : --x = --x
6. - commutes with + : -(x+y) = (-x)+(-y).
7. + commutes with 0 : 0+0 = 0
8. + commutes with - : -(x+y)=(-x)+(-y)
9. + commutes with + : (x+y)+(x'+y')=(x+x')+(y+y').

A: Let $(A,\cdot)$, $(B,\star)$ be abelian groups and
$$\operatorname{Hom}(A,B):= \{\ \varphi:A\to B \ |\ \text{$\varphi$ is a group homomorphism}\ \}.$$
Now you want to define an operation on $\operatorname{Hom}(A,B)$ to make it into a group. So for $\varphi,\psi:A\to B$ group homomorphisms, you are looking for some homomorphism $\varphi\bullet\psi:A\to B$. How should $\varphi\bullet\psi$ act on an element $g\in A$? We don't have much choice: Both $\varphi$ and $\psi$ give us elements $\varphi(g), \psi(g)\in B$, so we just multiply those in $B$ and take that:
$$ (\varphi\bullet\psi)(a) := \varphi(a)\star\psi(a) $$
for all $a\in A$.
Now you have to check that $\varphi\bullet\psi$ is a group homomorphism whenever $\varphi$ and $\psi$ are and that $(\operatorname{Hom}(A,B),\bullet)$ is an abelian group with the introduced operation. Both are easy tasks I'll leave to you.
Edit: Since you are struggeling with proving that $\varphi\bullet\psi$ is a homomorphism again: Let $\varphi, \psi: A\to B$ be homomorphism and $x,y\in A$:
\begin{align}
(\varphi\bullet\psi)(x\cdot y) &\stackrel{\text{def}}= \varphi(x\cdot y) \star \psi(x\cdot y) \stackrel{\text{$\varphi,\psi$ hom.}}= \left(\varphi(x)\star\varphi(y)\right)\star\left(\psi(x)\star\psi(y)\right) \\
&\stackrel{\text{$B$ abelian}}= \varphi(x)\star\psi(x)\star\varphi(y)\star\psi(y)
\stackrel{\text{def}}= (\varphi\bullet\psi)(x)\star(\varphi\bullet\psi)(y).
\end{align}
Edit: I changed the symbols of the operations, so see what is really happening.
A: Just check it.
Let $(G,\cdot)$ be a group and let $X$ be a set.
Then on the set $\operatorname{Map}(X,G)$ of maps $X\to A$ we can define a binary operation (again denoted with $\cdot$) by letting, for $f,g\colon X\to A$ $f\cdot g\colon X\to A$ be the map given by $(f\cdot g)(x)=f(x)\cdot g(x)$. 
Then $(\operatorname{Map}(X,G),\cdot)$ is a group: Associativity is immediately inherited from $G$; the neutral element is the constant map to $1\in G$; the inverse of $f$ is the map tha maps to the inverse element-wise.
For any group $G$, we have that $\operatorname{End}(G)$ is a subset of $\operatorname{Map}(G,G)$, so we may wonder when this subset is in fact a subgroup. By the well-known subgroup criteria we need to check first of all that $f\cdot g$ is an endomorphism whenever $f,g$ are. That means that for $x,y\in G$ we must have $$(f\cdot g)(x\cdot y)=(f\cdot g)(x)\cdot(f\cdot g)(y),$$
i.e. 
$$f(x\cdot y)\cdot g(x\cdot y)=f(x)\cdot g(x)\cdot f(y)\cdot g(y). $$
As $f,g$ are endomorphisms, the left hand side equals $f(x)\cdot f(y)\cdot g(x)\cdot g(y)$ and the equation simplifies to $f(y)\cdot g(x)=g(x)\cdot f(y)$. This must hold especially for $f=g=\operatorname{id}_G$, i.e. we need $y\cdot x=x\cdot y$ for all $x,y\in G$ - the group $G$ must necessarily be abelian!
On the other hand, if $G$ is indeed abelian, then the above computations work out fine and $f\cdot g$ (or $f+g$ if we write the group operation additively for abelian groups) is indeed again an endomorphism of $G$. To complete the check of subgroup criteria, verify that the pointwise inverse of an endomorphism is again an endomorphism (because $G$ is abelian).
A: There was a mistake in the book, so going through a different edition it appears as if the groups A and B have the same operation on them which is +, and u have to prove that (hom(A,B),+) is a group,which is pretty basic. so i don't think any of the answers are correct, because I get to an absurd point in trying to prove the problem stated above. 
