Let us consider the number of edges = x
we know that a triangle will have 3 edges and a square will have 4 edges. Using this details we can form an equation.
3x + 4x = 8484
7x = 8484
x = 8484/7
= 1212
Then
Number of square tiles = 1212/4
= 303
So there are 303 square tiles in the box. I hope the procedure is clear enough for your understanding. You can always use this method for solving similar problems.