my cousin asked for help on this math problem and the answer is apparently 6 but i can't find a coherent pattern that fits all of the triangles. I included an image of the question.

my cousin asked for help on this math problem and the answer is apparently 6 but i can't find a coherent pattern that fits all of the triangles. I included an image of the question.

The missing no is 6. Sum of numbers in each horizontal layer is 36.