Couyld someone give some hints on how to prove this :
Claim: Let $T$ be a $\tau$-theory and $\varphi$ a $\tau$-formula, that have the same models. Then $\varphi$ is equivalent to a finite conjunction of formulas of $T$.
I was thinking about arguing that if $\mathcal{M} \models T$ then $\mathcal{M} \models \varphi$. So $T \models \varphi$. Then by compactness there must be some finite $\Delta \in T$ such that $\Delta \models \varphi$. Then I claim that $\mathcal{M} \models \varphi $ iff $\mathcal{M} \models \Delta$. Is this correct ?
Yes, your argument is correct. As long as your definition of "$\varphi$ is equivalent to $\Delta$" is that $\varphi$ and $\Delta$ have the same models.
The last step could do with some more explanation. The reasoning is hidden below.