Im giving category theory a chance but have very limited math background, I'm learning from the book "Category theory for the sciences" but got lost on page 16 :)
Exercise 2.1.2.12. Let $A=\{1,2,3,4,5\}$ and $B=\{x,y\}$.
- How many elements does $\operatorname{HomSet}(A,B)$ have?
- How many elements does $\operatorname{HomSet}(B,A)$ have?
My thinking is that $\operatorname{HomSet}(A,B) = \operatorname{HomSet}(B,A) = 10$ since there are 10 ways i can map and element in $A$ to an element in $B$ but I'm clearly missing the whole point since this is not the correct answer.

Assuming the morphisms are just plain old functions, then let me tell you a very clever bit of notation: the set of functions from $A$ to $B$ to denoted $B^A$. Why? Because it has size $|B|^{|A|}$. Why? Because for every $a$ in $A$, there are $|B|$ places it can go; since we can pick where $a$ goes independently of where we pick $a'$ goes, for $a' \ne a$, we have $\underbrace{|B|\times\dotsb\times|B|}_{|A|\text{ times}}$ possibilities.