Pay close attention to how each shape moves. I’ve given the answers below if you want to confirm your answer.
Squares
Squares move clockwise along the border
Circles
Circles move diagonally and bounce off walls
Triangles
Triangles move down two boxes and wrap around to the first column
Order of precedence
Some shapes get priority over others. You can see that when both a square and a circle are about to occupy the same position, the square gets preference and the circle moves on to its next position.
Order of precedence in occupying a box - square > circle > triangle, so fill squares first, circles second and triangles last