Proving that the collection of all maps between two sets is a set I've been just introduced to Zermelo-Fraenkel set theory, and I don't know the proper way to approach this exercises yet. 
Here I'm being asked to prove that $B^{A}$ (i.e. the collection of all maps between the sets $A$ and $B$) is a set itself.
I know the axioms but it's hard for me now to figure out which axiom do I have to start with to attack this exercise.
I'd appreciate any hint.
Thanks for your time.
 A: A function $f:A\to B$ is represented in Zermelo-Fraenkel set theory as the set
$$\{(a,b)\mid f(a)=b\}$$
which is commonly called the graph of $f$.
Thus, this tuple-representation of a function is a subset of the cartesian product of $A$ and $B$, i.e. $A\times B$(and by the axiom of separation really a set). Followingly, a function is a member of $\mathcal{P}(A\times B)$, and thus the set of all functions $B^A$ is contained in $\mathcal{P}(A\times B)$ and thus by separation really again a set as $\mathcal{P}(A\times B)$ is.

To give some more detail, especially on how to show that $A\times B$ is a set:
In $\mathsf{ZF}$, you commonly represent the ordered pair $(a,b)$ as $\{\{a\},\{a,b\}\}$(the Kuratowski representation for ordered pairs) for sets $a,b$(as in $\mathsf{ZF}$ sets are all there is). The existence of this set is guaranteed by the axiom of pairing and the axiom of extensionality, as you may form $\{a,a\}=\{a\}$ and $\{a,b\}$ and pair them again.
Thus, formally, $(a,b)$ is a subset of $\mathcal{P}(A\cup B)$ and followingly an element of $\mathcal{P}(\mathcal{P}(A\cup B))$(where the existence $A\cup B$ is provided by the axiom of union and $\mathcal{P}(A\cup B)$ by the powerset axiom and so on). Thus, the set of all ordered pairs of $A$ and $B$, $A\times B$, is a subset of $\mathcal{P}(\mathcal{P}(A\cup B))$ which can be derived through the axiom of separation.
You can then follow the route exhibited above.
A: Well, a function from $A$ to $B$ is a subset of $A \times B$ hence set itself.
A: You know that $\mathcal P(A\times B)$ is a set. Now use the axiom schema of replacement.
$$B^A = \{X\subset A\times B:\\   (\forall a\in A)(\exists (x,y)\in X)(\forall y'\in B)(x=a\land ((a,y), (a,y')\in X\implies y=y')\} $$
To translate the predicate-logical mumbo jumbo in the comprehension:  


*

*We want all of $A$ to be represented in $X$.

*The relation must be a function.

