I'm having trouble solving this exercise:
Let $\mathcal{L} = \{<\}$ be the language of (strictly) ordered sets, and $\mathcal{Q} = (\mathbb{Q}, <)$ be the $\mathcal{L}$-structure such that $<^\mathcal{Q} $ is the usual order of rational numbers. If $q \in \mathbb{Q}$, the complete type generated by $q$, without parameters, is $tp_\mathcal{Q} (q)= \{ \phi(x) : \mathcal{Q} \vDash \phi(q) \}$. Then, for all $p, q \in \mathbb{Q}$, $tp_\mathcal{Q}(p) = tp_\mathcal{Q}(q)$.
I don't know how to prove it, tried to do some induction on complexity of formulas - but in the existential case, the number of free variables on the formula on which to do induction is two, and I can't do induction. I think it has to do with the fact that the theory of dense linear orderings without endpoints is complete, but I don't know how to relate the problem to that.
This is just the automorphism approach, but done out long-hand.
The proof is by induction on formula structure. For atomics, it is clear that $a_1=a_2\iff f(a_1)=f(a_2)$ and $a_1<a_2\iff f(a_1)<f(a_2).$ The $\lnot$ and $\land$ steps are trivial.
If $\mathbb Q\models \exists x\varphi(x,\vec a),$there is a $b\in\mathbb Q$ such that $\mathbb Q\models \varphi(b,\vec a)$ which by the induction hypothesis means $\mathbb Q\models \varphi(f(b),f(\vec a)),$ but then $f(b)$ is a witness to $\exists x\varphi(x,f(\vec a)).$ Conversely, if $\mathbb Q\models \exists x\varphi(x,f(\vec a))$ then since $f$ is a bijection, any witness takes the form $f(b)$ for some $b$, so we have $\mathbb Q\models \varphi(f(b),f(\vec a))$ so by the induction hypothesis, $\mathbb Q\models \varphi(b,\vec a)$ and we have a witness to $\mathbb Q\models \exists x\varphi(x,\vec a).$
Now just observe that $f(q)=p$ so we have $$ (\mathbb Q,<)\models \varphi(q)\iff (\mathbb Q,<)\models \varphi(p),$$ and we're done.
And then finally, observe that we didn't use any particular facts about the structure $(\mathbb Q,<)$, $f$, and $p$ and $q$ other than that $f$ is an isomorphism such that $f(q)=p.$ So we have the very useful
(Often used in the above context where $\mathcal M=\mathcal N$ and so $f$ is an automorphism).
This is stronger than necessary: really we just need $f$ to be an elementary embedding (even a partial elementary embedding), and the lemma above is just a proof that an isomorphism is an elementary embedding.