This contradiction is arising because of the wrong statement that 'since both roots are roots are equal, both equations have the same roots'. Both roots of the first equation are same, does not imply that every quadratic equation having that root as one of the roots, has both roots equal.
Now proving the claim:
We wish to show that $x=-\sqrt\frac{c}{a}$ is a root of the equation $dx^2+2ex+f=0$ if $\frac{d}{a},\frac{e}{b}$ and $\frac{f}{c}$ are in AP. First let $r=\frac{e}{b}$ and $m=\frac{e}{b}-\frac{d}{a}=\frac{f}{c}-\frac{e}{b}$. Then applying quadratic formula in $dx^2+2ex+f=0$, we get,
$$x = \frac{-e+\sqrt{e^2-df}}{d}$$
$$=\frac{-br+\sqrt{b^2r^2-ac(r-m)(r+m)}}{a(r-m)}$$
$$=\frac{-br+bm}{a(r-m)}$$
$$=-\sqrt\frac{c}{a}$$
Hence proved
EDIT
Now, since the OP wants to prove that this is an 'if and only if' statement, here is the proof of the other direction.
$$d\frac{c}{a}-2e\sqrt\frac{c}{a}+f=0$$
$$\iff dc-2eb+fa = 0$$
$$\iff dc+fa = 2eb$$
$$\iff \frac{d}{a}+\frac{f}{c}=2\frac{e}{b}$$
Last step follows by dividing both sides by $ac$. Also, note that all steps are iff in this proof, and hence it is proof of both directions, we need not do the earlier proof separately.