Correct option is B
In this question following patter is followed-
(1st + 2nd) × 3 = 3rd Number
4, 2, 18 → (4 + 2) × 3 = 6× 3 = 18
1, 7, 24 → (1 + 7) × 3 = 8 × 3 = 24
Similarly,
5, 4, ? → (5 + 4) × 3 = 9 × 3 = 27
Therefore, the correct answer is (b).