I am trying to solve the following problem from an introductory book on mathematical logic: Let $N\subseteq M$ be a substructure. Show that for every quantifier-free $L$-formula $\varphi$ with free variables $x_1,\ldots,x_n$ and for every $n$-tuple $m_1,\ldots,m_n$ of elements of $N$, we have
$$N\models\varphi(m_1,\ldots,m_n)\iff M\models\varphi(m_1,\ldots,m_n).$$
My solution goes as follows: Let $\psi$ be the $L_N$-sentence $\varphi(m_1,\ldots,m_n)$ for some fixed $n$-tuple $m_1,\ldots,m_n$ of elements of $N$. We show by induction on the height of $\psi$ that $N\models\psi$ if and only if $M\models\psi$ where $N$ and $M$ are interpreted as $L_N$-structures in the natural way (this is the same as the equivalence given in the problem). First, assume that $\psi$ is of the form $R(t_1,\ldots,t_k)$ for some $k$-place relation symbol $R$ and some closed $L_N$-terms $t_1,\ldots,t_k$. By the definition of a substructure, we see that $t_i^N\in N$ for all $i$ and then, again by the definition of a substructure, it must hold that $N\models R(t_1,\ldots,t_k)$ if and only if $M\models R(t_1,\ldots,t_k)$. We can do the same thing if $\psi$ is of the form $t_1=t_2$ for some closed $L_N$-terms $t_1,t_2$, so this deals with the case when $\psi$ is atomic. Next, suppose that $\psi$ is of the form $\alpha\land\beta$ for some $L_N$-formulas $\alpha,\beta$ such that the given equivalence holds. Then, $N\models\psi$ iff $N\models\alpha$ and $N\models\beta$ iff $M\models\alpha$ and $M\models\beta$ iff $M\models\psi$. If $\psi$ is of the form $\alpha\lor\beta$, $\neg\alpha$ or $\alpha\rightarrow\beta$, we proceed in a similar way. Since we were only interested in quantifier-free formulas, this finishes the induction.
Is this solution correct? Are there other solutions, that don't use induction on the height of $\varphi$, to this problem?
The solution is correct, but a bit incomplete.
As you say, it follows from the definition of a substructure (namely, the property that it is a structure) that $t_i^N\in N$, but this is not enough. You need to show that $t_i^N(m_1,\ldots,m_n)=t_i^M(m_1,\ldots,m_n)$ (which is a similar inductive argument).
I doubt the inductive arguments can be avoided, although I think there are some ways to at least partly sweep them under the rug (but that only serves to make the argument less transparent and actually more complicated, as far as I can tell).