Answer is either 2 or 1 more than the middle term. To decide if it's 2 or 1 more than the middle term we can check the difference between the 1st and 3rd term, and if it's even it's 2 more and if it's odd it's 1 more.
For instance in
9,7,4 the answer could have been 7+1=8 or 7+2=9. But since
9 - 4 = 5 (odd) the answer will be 7+1 = 8
So for 3,6,7 it will be 6+2 = 8 because 3-7 = -4 (even)