Solution:
Let and
For each we have n possible images. Therefore, the number of functions from X to Y is
Suppose contains m elements and contain elements. The number of functions from to is
Let and
For each we have n possible images. Therefore, the number of functions from X to Y is