JavaScript (ES6), 28 bytes
(a,b,c)=>c-2*b+a?c*c/b:2*c-b
Commented
(a, b, c) => // given the 3 integers,
c - 2 * b + a ? // if the sequence is not arithmetic:
c * c / b // assume it's geometric and return the next geometric term
: // else:
2 * c - b // return the next arithmetic term
JavaScript (ES6), 28 bytes
(a,b,c)=>c-2*b+a?c*c/b:2*c-b
Commented
(a, b, c) => // given the 3 integers,
c - 2 * b + a ? // if the sequence is not arithmetic:
c * c / b // assume it's geometric and return the next geometric term
: // else:
2 * c - b // return the next arithmetic term