Do you know what it means to be onto? It means everything in the second set is in the image of the first set.

1) a function sends something in the domain to something in the range. It can only send it to 1 thing though, otherwise it is not a function. So is there anyway 3 elements could possibly hit all 5 elements of the range codomain? no. So there are 0 functions that can do this

I will do one more, and leave the last one up to you.

2) we may as well just number the elements say in A the domain let the set be {1,2,3,4} and the range B={0,1}

I will use a bit of bad notation to describe these functions to save time. The coordinates (a,b,c,d) will represent a is where 1 is sent, b is where 2 is sent, c is where 3 is sent d is where 4 is sent.

All possible functions are

(0,0,0,0)

(0,0,0,1)

(0,0,1,0)

(0,0,1,1)

(0,1,0,0)

(0,1,0,1)

(0,1,1,0)

(0,1,1,1)

(1,0,0,0)

(1,0,0,1)

(1,0,1,0)

(1,0,1,1)

(1,1,0,0)

(1,1,0,1)

(1,1,1,0)

(1,1,1,1)

The ones in red are the ones that are not onto because they do not hit everything in the codomain B. Understand? So how many of those are actually onto?

Think you can handle 3)? I do. Good luck on the exam.