Let $\mathbf A = (A,\leq)$ be a countable dense linear order without endpoints
and $\mathbf B \leq \mathbf A$ (a substructure of $\mathbf A$) which is dense in $\mathbf A$.
The problem: Show that $\mathbf B$ is an elementary substructure of $\mathbf A$.
My immediate tentative was to notice that if $\mathbf B$ is dense in $\mathbf A$, then $B$ is also countable, and so $\mathbf B\cong\mathbf A$. Then I concluded that $\mathbf B\preceq\mathbf A$.
However, I then realised this reasoning is wrong.
For example, $(2\mathbb Z,+,0)$ is a substructure of $(\mathbb Z,+,0)$, and they are isomorphic.
Nevertheless, the former is not an elementary substructure of the latter.
As an example of a sentence witnessing this,
$$\exists x (x+x\approx2)$$
is valid on $\mathbb Z$ but not on $2\mathbb Z$.
I suppose the trick must be in some cleaver use of the fact that $\mathbf B$ is dense in $\mathbf A$, although honestly, it's not even obvious to me that that is crucial (wouldn't, for example, $\mathbb Q\setminus[0,1]$ be an elementary substructure of $(\mathbb Q,\leq)$?).
I must also add that I only have the definition and no result to help me (in case someone says "Well, it's an immediate consequence of result X").
Thanks in advance!
Well, it's an immediate consequence of quantifier elimination for $\text{DLO}$. If $B$ is dense in $A$, then also $B\models \text{DLO}$, so $B$ is an elementary substructure, since quantifier elimination implies model completeness.
Sorry, that was a bit facetious - you explicitly asked for an answer which is not of that form.
If you know the Tarski-Vaught test, you can apply that here. If you don't know it, you can reprove it by proving directly that for all $\varphi(\overline{x})$ and all $\overline{b}\in B$, $B\models \varphi(\overline{b})$ if and only if $A\models \varphi(\overline{b})$ by induction on the structure of $\varphi$.
In either case, you'll end up having to check the case of a single existential quantifier (this is the hypothesis of Tarski-Vaught and the only tricky step in the induction proof). Here you'll need to use density of $B$, and the fact that if $c < a < c'$ and $c < b < c'$ in $A$, then there is an automorphism of $A$ fixing $(-\infty,c]$ and $[c',\infty)$ and moving $a$ to $b$ (this step is probably why the countability assumption on $A$ was included).
Incidentally, you can use a very similar argument to prove quantifier elimination.
In actuality, the assumption that $A$ is countable is unnecessary, and as you suggested, the assumption that $B$ is dense in $A$ is unneccessary - all you need is that $B$ is dense in itself. So $\mathbb{Q}\setminus [0,1]$ is an elementary substructure of $\mathbb{Q}$, but $\mathbb{Q}\setminus (0,1)$ isn't (it's not a dense linear order). You can see these things directly from the model completeness argument.