Yes it should be $5^4 - 5$ as Shubhgupta said.
Any ball can go into any box $5^4$
balls should not be going to same box $5$
total=$5^4 - 5$
this may help https://gateoverflow.in/132665/%23discrete-%23combinatorics
64.3k questions
77.9k answers
244k comments
80.0k users