3. Given an integer $n \geqslant 5$. Find the smallest integer $m$, such that there exist two sets of integers $A$ and $B$, simultaneously satisfying the following conditions:
(1) $|A|=n,|B|=m$, and $A \subseteq B$;
(2) For any two distinct elements $x, y$ in set $B$, $x+y \in B$ if and only if $x, y \in A$.
（Zhai Zhenhua $\quad$ provided）
3. First, take an integer $N \geqslant 2 n$, and consider
$$
\begin{array}{l}
A=\{N+1, N+2, \cdots, N+n\}, \\
B=A \cup\{2 N+3,2 N+4, \cdots, 2 N+2 n-1\} .
\end{array}
$$

Condition (1) is clearly satisfied.
On one hand, for any $x, y \in A, x \neq y$, we have
$$
2 N+3 \leqslant x+y \leqslant 2 N+2 n-1 \text {. }
$$

Thus, $x+y \in B$.
On the other hand, for any $x, y \in B, x \neq y$, if $x, y$ do not both belong to $A$, then
$$
x+y>3 N>2 N+2 n-1 \text {. }
$$

Thus, $x+y \notin B$.
Therefore, condition (2) is also satisfied.
This shows that when $m=3 n-3$, there exist sets $A, B$ that meet the requirements.
Let $A, B$ be any sets of integers that satisfy the given conditions.
Next, we prove: $|B| \geqslant 3 n-3$.
Without loss of generality, assume that the number of positive integers in set $A$ is no less than the number of negative integers (otherwise, consider $-A$ and $-B$, which also satisfy the given conditions, and $-A$ has no less positive integers than negative integers).
Let the elements of set $A$ be $a_{1} < a_{2} < \cdots < a_{n}$.
Thus, $a_{n-1}+a_{n}>a_{n}$.
Therefore, $a_{n-1}+a_{n} \in B \backslash A$.
Hence, $|B| \geqslant n+1$.
Therefore, $0 \notin A$.
Otherwise, take $x \in B \backslash A$, then $0+x=x \in B$, but $0 \in A, x \notin A$, which is a contradiction.

Since $n \geqslant 5$, and $0 \notin A$, thus, set $A$ contains at least three positive numbers, i.e., $a_{n-2}>0$.
Therefore, $a_{n}+a_{n-2}>a_{n}$.
Hence, $a_{n}+a_{n-2} \notin A$.
Next, we prove two conclusions.
(1) For any integer $i(1 \leqslant i < n-1)$, there exists an integer $k(1 \leqslant k \leqslant n)$ such that
$$
a_{i}+a_{k} \in B \backslash A \text{ and } a_{i}+a_{k} \neq a_{n} \text{. }
$$

(2) For any integer $i(1 \leqslant i < n-1)$, there does not exist an integer $k(1 \leqslant k \leqslant n)$ such that
$$
a_{i}+a_{1}=a_{n} \text{. }
$$

Thus, $a_{i}+a_{k} \in B \backslash A$.
Consider $\left(a_{1}+a_{i}\right)+a_{k}=a_{n}+a_{k} \in B$, but $a_{1} \in A$, and $a_{i}+a_{k} \in B \backslash A$, which is a contradiction.

From conclusions (1) and (2), we know that the following $2 n-3$ distinct numbers
$$
\begin{array}{l}
a_{1}+a_{2}<a_{1}+a_{3}<\cdots<a_{1}+a_{n} \\
<a_{2}+a_{n}<\cdots<a_{n-1}+a_{n}
\end{array}
$$

all belong to $B \backslash A$.
$$
\text{Thus, }|B| \geqslant 3 n-3 \text{. }
$$

In summary, the required $m=3 n-3$.