Option (B) is correct.
Explanation:
Let the bottom row be a,b,c,d,e and build upwards.
row 2: a+b, b+c, c+d, d+e
row 3: a+2b+c, b+2c+d, c+2d+e
row 4: a+3b+3c+d, b+3c+3d+e
top: a+4b+6c+4d+e
So the centre number is counted 6 times, its neighbours 4 times and the corners once.
2+4×1+6×3+4×1+2=2+4+18+4+2=30
Check by filling: 3,4,4,3; then 7,8,7; then 15,15; top 30.
Why the other options are wrong
- (A) 9 is 2+1+3+1+2, the bottom row counted once each.
- (C) 19 counts the three middle numbers 3 times each (2+3+9+3+2), copying the 4-row pattern. In a 5-row pyramid they are counted 4, 6 and 4 times.
- (D) 24 counts the three middle numbers 4 times each (2+4+12+4+2). The centre number is counted 6 times, not 4.