The answer says $1024$, which I guess is coming from $4^5$. So its like "$4$ students fit into each prize" $+$ repeats allowed + $5$ prizes $= 4^5 = 1024$.

Why not "$5$ prizes for each student" $+$ repeats allowed $+ 4$ students , thus $5^4 = 625$?