Question: > 
> In class we learned the number of functions from an $m$-element set to an $n$-element set is $n^{m}$. So this answer should be $5^{3}$? 
> 
> 
> 

I just need confirmation if my answer is correct, if not explain to me why it's not.

Answer: 
First split $[5]$ into $3$ nonempty blocks, then assign values from $[3]$ to these blocks in $3!=6$ ways. The number of splittings is the *[Stirling number of the second kind](https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind)* $S(5,3)$. It is obtained as follows:

The blocks can have sizes (a) $3,1,1$ or (b) $2,2,1$. In case (a) the large block can be formed in ${5\choose 3}=10$ ways. In case (b) the singleton can be chosen in $5$ ways, and the remaining four elements can then be paired in $3$ ways, makes $15$ splittings. 

It follows that $S(5,3)=25$, so that there are $25\cdot6=150$ surjective mappings $f:\>[5]\to[3]$.
When talking about functions, the word 'onto', which you used in the title of the question, has a specific technical meaning (it means the function is 'surjective'). If this is what you meant then the other responses give the answer.

If you were just using 'onto' to mean the same as 'to', then the only problem with your answer is that you swapped the roles of $n$ and $m$, so the answer should be $3^5$. (You can see this, as each of the five elements has a choice of three things the function can send it to, so there are $3\times 3\times 3\times 3\times 3$ possible choices.)