Find $a\in\mathbb{R}, a\neq 0$ such that the parabolas of the functions $f$ and $g$ are tangent. 
Find $a\in\mathbb{R}, a\neq 0$ such that the parabolas of the functions $f$ and $g$ are tangent.

$f_a(x)=ax^2-(a+2)x-1$.
$g_a(x)=x^2-x-a$.
At first what I tried is find their derivative and just make them equal, but it's nowhere near the good answer...
What I tried: 
since they must be tangent I thought their derivative should be equal so we have:
$f_a'(x)=2ax-(a+2)$ and $g_a'(x)=2x-1$ by making them equalling we get $a = 1$ and $a = -1$ at the same time... which is completely wrong (that's why I didn't added this).
Following B.Metha's advice we have:
$f_a(x) - g_a(x) = (a-1)x^2-(a+1)x+a-1.$ 

$f_a(x)
=ax^2-(a+2)x-1
$,
$g_a(x)=x^2-x-a
$.
Their tangents are
$f_a'(x)
=2ax-(a+2)
$,
$g_a'(x)=2x-1
$.
The tangents have 
the same slope when
$2ax-(a+2)
=2x-1
$
or
$2x(a-1) = a+1
$
or 
$x = \frac{a+1}{2(a-1)}$
(if $a \ne 1$).
If $a=1$ then
$f_a=g_a$
so the curves are identical.
They intersect when
$ax^2-(a+2)x-1
=x^2-x-a
$
or
$(a-1)x^2-(a+1)x+a-1
=0
$.
To have the same slope there,
we must have
$\begin{array}\
0
&=(a-1)x^2-(a+1)x+a-1\\
&=(a-1)(\frac{a+1}{2(a-1)})^2-(a+1)(\frac{a+1}{2(a-1)})+a-1\\
&=\frac{(a+1)^2}{4(a-1)}-\frac{(a+1)^2}{2(a-1)}+a-1\\
&=-\frac{(a+1)^2}{4(a-1)}+a-1\\
&=\frac{4(a-1)^2-(a+1)^2}{4(a-1)}\\
&=\frac{3a^2-10a+3}{4(a-1)}\\
\end{array}
$
so
$3a^2-10a+3
=0$
or
$a
=\dfrac{10\pm\sqrt{100-36}}{6}
=\dfrac{10\pm\sqrt{64}}{6}
=\dfrac{10\pm 8}{6}
=\dfrac{18, 2}{6}
=3, \frac13
$.
For
$a=3$,
$x = \frac{4}{2(2)}
=1
$
and for
$a=\frac13$,
$x
=\frac{\frac43}{2(-\frac23)}
=-1
$.
