For the first ball there are $5$ places we can put it. After putting the first ball in a box, we have $4$ places where we could put the second ball. Thus there are $5\cdot4=20$ ways.
Edit
With your comment, I believe you mean to say that both the boxes and the balls are labelled i.e. distinct. I will use the notation $\{a,b\}$ to mean that ball $1$ is placed in box $a$ and ball $2$ is placed in box $b$. Under this scheme, you can see that the calculation I made above takes into account the fact that $\{a,b\}\neq\{b,a\}$, where $a\neq b$. Thus $20$ should be the answer you are looking for.