The number in the middle of the first triangle is found with the folowing calculation: (5 - 8) * 6 = -18
The number in the middle of the second triangle is found with the folowing calculation: : (30 - 6) * 40 = 960
Therefore the question mark should be replaced with the number: 960