<s>[INST] determining the common difference of an arithmetic sequence and common ratio of a geometric sequence with related terms Coming from a finance guy, I understand how AP and GP work. However, I came upon a problem that combines the two and was stuck.  Here it goes.
Given first term of AP and GP$=4$, and common ratio of GP is $8$ less than common difference of AP. The ratio of $3$rd term of AP to $3$rd term of GP is $7:16$. What is the common difference and common ratio?
I tried it this far:
given common ratio$=r$
difference$=d$
so $r=d-8$
for the AP; 3rd term$=4+2d$
and GP$=4(d-8)(d-8)$
so $(4+2d) : 4(d-8)(d-8) =7:16$
and I got this far..
some headway please.. 
 [/INST] Here, assume that the AP is :
$$a, a+d, a+2d, ...$$
and, the GP is  :
$$ a,  ar, ar^2 ,...$$
Then from the given data -
$a = 4$, $ r = d - 8$ ( or $d = r + 8$) and $\frac {a + 2d}{2r^2} = \frac{7}{16}$.
The third equation above simplifies as,
$\frac{4+2d}{4r^2} = \frac{2+d}{2r^2} = {7\over 16}$
$\implies \frac{r+10}{2r^2} = frac{7}{16}$ ( by the second equation)
$\implies 7r^2 - 4r - 40 = 0$
or, $r = \frac{4 \pm \sqrt{16 + 4.7.40}}{2.7} = \frac{4\pm \sqrt{1136}}{14}$ (using the quadratic formula)
Thus, $r = 2.693$ or $-2.121$ (approximately)
Using the second equation above,  $d = 10.693$. or $5.8782$ (approx.)
</s>