I need to know how to solve this type of problem. Its a practice problem for a math competition:
Given a 4-term sequence such that the first 3 terms form an arithmetic sequence and the last 3 terms form a geometric sequence. If the first term is 2 and the last term is 9, find the third term of this sequence.
Let the second term and third term be $2+n$ and $2+2n$. Then we make an equation: $$(2+2n)^2=9(2+n)\\ 4n^2+8n+4=18+9n \\ 4n^2-n-14=0 \\ (4n+7)(n-2)=0 \\ n=-\dfrac{7}{4} \lor n=2$$
So the third term can be $2+2\times-\dfrac{7}{4}=-1.5$ or $2+2\times 2=6$