Notice in these problems that the number at the beginning of the problem and the number that goes in the box equal the total number of triangles when they are multiplied. In this problem we have 4 x 5 = 20.
In this problem we have 3 x 4 = 12.