Solution:Logic:- Find the difference between first two numbers and last two numbers then again find difference between them.
(12, 4, 37, 25),
⇒ {(37 - 25) - (12 - 4)} = 4
(2, 36, 87, 51),
⇒ {(87 - 51) - (36 - 2)} = 2
Similarly,
(18, 3, 58, 49), {(18 - 3) - (58 - 49)} = 6