With a category $\mathcal{C}$, it seems to me that arrows are given with two maps $dom, codom$ from the class $Ar(\mathcal{C})$ to the class $Ob(\mathcal{C})$ so that if $f\in Hom_C(X,Y)$ is given we have $dom(f)=X,codom(f)=Y$. Now, if 
$$f\in{\bf Hom}_\mathcal{C}(Y,Z)\cap{\bf Hom}_\mathcal{C}(Y',Z')$$ 
and 
$$g\in{\bf Hom}_\mathcal{C}(X,Y)\cap{\bf Hom}_\mathcal{C}(X',Y')$$
we must have $X=X',\ Y=Y',\ Z=Z'$. 
The situation is very much like in graph theory, for the definition of a Directed Multigraph, a Quiver or an Automaton. I pick the definition in [1]. 

_A Graph (understand Directed Multigraph) $\Gamma$ consists of a set $X=vert\Gamma$ and a set $Y=edge\Gamma$ and two maps $o:\ Y\to X$ (origin) and $t:\ Y\to X$ (target)._  

**Late edit** The MO legitimately interprets these ``functions'' as "constructed" whereas they are "thought" as univalued (it is explicit in Serre) in the mind of many category theorists. 

This issue is explicitly unearthed and treated in [2] page 11 Remark 1.1.2 (e) 

``If $f ∈ \mathcal{A}(A, B)$, we call $A$ the **domain** and $B$ the **codomain** of $f$. Every
map in every category has a definite domain and a definite codomain. (If
you believe it makes sense to form the intersection of an arbitrary pair of
abstract sets, you should add to the definition of category the condition that
$\mathcal{A}(A, B) \cap \mathcal{A}(A', B') = \emptyset$ unless $A = A'$ and $B = B'$.)''    
 

[1] Jean-Pierre Serre (1977), _Trees_, Springer.

[2] Tom Leinster, _Basic Category Theory_, Cambridge University Press (2014)