I've been reading D. Marker's book on Model theory. In the part dealing with quantifier elimination there's a corollary I've been trying to prove without any luck:
Corollary 3.1.6 Let $T$ be an $L$-theory. Suppose that for all quantifier-free formulas $\phi(\bar{v},w)$, if $M,N\models T$, $A$ is a common substructure of $M$ and $N$, $\bar{a} \in A$, and there is $b \in M$ such that $M\models \phi(\bar{a},b) $ then there is $c \in N$ such that $N\models \phi(\bar{a},c)$. Then T has quantifier elimination.
How can one prove this?