The illusion is created by the fact that the two triangles (red and green) are not similar. The green triangle has a height of 2 squares and a base of 5 squares while the red triangle has a height of 3 squares and a base of 8 squares. The top arrangement looks like a triangle but it is not, it has four corners. Imagine a line drawn from the bottom left to the top point of the upper arrangement. The space between this line and the top of the arrangement is the square missing from the bottom arrangement.
Do I win a prize? ;)