Determine the arithmetic and geometric sequence given the relationships betweeen the first four terms No matter what I try, I can't solve this problem. I'm almost done but I need to get just one more thing to be able to finish it.

Problem
The first, second and fourth term of the arithmetic and of the geometric sequence are equal, respectively. The third term of the arithmetic sequence is by $18$ greater than the third term of the geometric sequence. Determine both sequences.


My attempt
I first wrote down the relationships between the terms.
$$a_1=b_1$$
$$a_2=b_2$$
$$a_3=b_3+18$$
$$a_4=b_4$$
We can rewrite the last three relationships as
$$a_1+d=b_1r$$
$$a_1+2d=b_1r^2+18$$
$$a_1+3d=b_1r^3$$
Then we can square $a_2=b_2$
$$a^2_2=(a_1+d)^2=b^2_2=(b_1r)^2$$
Rewrite $(b_1r)^2$
$$(b_1r)^2=b^2_1r^2=b_1b_1r^2=b_1b_3$$
So, we now know that $a^2_2=b_1b_3$. Based on that, we can write
$$(a_1+d)^2=b_1b_3$$
And since $b_1=a_1$
$$(a_1+d)^2=a_1b_3$$
We also know that $a_3=b_3+18 \leftrightarrow b_3=a_3-18$
$$(a_1+d)^2=a_1(a_3-18)$$
Which gives
$$(a_1+d)^2=a_1(a_1+2d-18)$$
Now, let's rewrite that as
$$a^2_1+d^2+2a_1d=a^2_1+2a_1d-18a_1$$
From that we have
$$d^2+18a_1=0$$
Now I just need to get another equation to form a system of equations. From that, I can get $d$ or $a_1$, and then I can use the variable that I've got to get the second variable (i.e. the one I did not got). When I get $a_1$, I also get $b_1$ since $a_1=b_1$. Then I'll have $d$, $a_1$ and $b_1$. If I know these variables, I can easily get $r$. And then I can finally write out both sequences.

Of course, I also have the solution. It is


 Arithmetic sequence: $$\langle-2,4,10,16,...\rangle$$
 Geometric sequence: $$\langle-2,4,-8,16,...\rangle$$

 A: Let the AP be $u_n=a+(n-1)d$ and the GP be $v_n=ar^{n-1}$.
\begin{align}
  a+d &= ar  \tag{$u_2=v_2$} \\
  a &= \frac{d}{r-1} \tag{1} \\
  a+3d &= ar^3  \tag{$u_4=v_4$} \\
  a &= \frac{3d}{r^3-1} \tag{2} \\
  r^3-1 &= 3(r-1) \tag{$2) \div (1$} \\
  (r-1)(r^2+r+1) &= 3(r-1) \\
  (r-1)(r^2+r-2) &= 0 \\
  (r-1)^2(r+2) &= 0 \\
  r &= -2 \tag{reject $r=1$} \\
  d &= -3a \\
  a+2d &= ar^2+18 \tag{$u_3=v_3+18$} \\
  a-6a &= 4a+18 \\
  a &= -2 \\
  d &= 6
\end{align}
A: Here we know that $r\neq1$ otherwise all terms would be equal and it would not be possible to have the third term of the AP being greater than the third term of the GP. 
Let $T_i$ be the $i-$th term of the AP. 
$$\begin{align}
\frac {T_4-T_2}{T_2-T_1}&=\frac {4-2}{2-1}\\
\frac {r^3-r}{r-1}&=2
&&\scriptsize (T_i=ar^{i-1}\text{ for } i=1,2,4)\\
r^2+r-2&=0
&&\scriptsize (\text{as }r\neq 1)\\
(r-1)(r+2)&=0\\
r&=-2 
&&\scriptsize (\text{as } r\neq 1)\\ \\ 
T_2-T_1=d&=a(r-1)\\
d&=-3a\\ \\
T_3=a+2d&=18+ar^2\\
a-6a&=18+4a\\
a&=-2\\\\
\Longrightarrow d&=6
\end{align}$$
Hence 


*

*$\color{red}{\text{AP}: \qquad -2,4,10,16}$

*$\color{red}{\text{GP}:\qquad -2,4,-8, 16}$

