Set up an equation for the left side and the right side.
Left side: 3 triangles x 6 = 18 + 4 squares
Right side: 4 triangles x 6 = 24 + 2 squares
Set them equal to each other :
18 + 4 squares = 24 + 2 squares
Subtract 18 from both sides:
4 squares = 6 + 2 squares
Subtract 2 squares from each side
2 squares = 6
Divide both sides by 2
1 square = 3 grams
The answer is 3 grams