You have to review the inductive cluses defining the set of well-formed formulae.
Tipically, we define the set of atomic formulae, like your : $3 + 2 = x$, and then we say that we can use them to build-up more "complex" ones by way of connectives.
Thus, if $\alpha, \beta$ are formulae, then also :
$(\lnot \alpha)$, $(\alpha \land \beta)$, $(\alpha \rightarrow \beta)$
are fomulae.
See Herbert Enderton, A Mathematical Introduction to Logic (2ed - 2001), page 16 :
[We have an alphabet with] the five symbols
$¬, ∧, ∨, →, ↔$
called sentential connective symbols.
We have included infinitely many sentence symbols $A_i$.
We want to define the well-formed formulas (wffs) to be the “grammatically correct” expressions.
The definition will have the following consequences:
(a) Every sentence symbol is a wff.
(b) If $\alpha$ and $\beta$ are wffs, then so are $(¬α), (α∧β), (α∨β), (α→β)$,
and $(α↔β)$.
(c) No expression is a wff unless it is compelled to be one by (a)
and (b).