why is the group size of the image of pie ({b1…bm}^n) is m^n?

shouldn’t it be the size of n?

This proof shows that the number of functions from A to B equals |B^n|, where n=|A|.

Your question is why is it true that |B^n|=|B|^n.

Try to prove it by induction on n.

Another way to prove that |B^n|=|B|^n:

An element in B^n is a sequence of n elements of B.

How many such sequences are there? you have |B| choices for the first element, |B| choices for the second element, and so on. So there are |B|^n such sequences.