[proofplan]
Two topologies on the same set coincide if and only if they share a common basis. We exhibit a basis for each topology and show they are equal. The product topology $\tau_A \times \tau_B$ has basis elements $(U \cap A) \times (V \cap B)$ where $U \in \tau_X$, $V \in \tau_Y$. The subspace topology $(\tau_X \times \tau_Y)|_{A \times B}$ has basis elements $(U \times V) \cap (A \times B)$ where $U \in \tau_X$, $V \in \tau_Y$. These are the same sets because $(U \times V) \cap (A \times B) = (U \cap A) \times (V \cap B)$.
[/proofplan]
[step:Identify a basis for the product topology $\tau_A \times \tau_B$]
The subspace topology $\tau_A$ has basis $\{U \cap A : U \in \tau_X\}$ and $\tau_B$ has basis $\{V \cap B : V \in \tau_Y\}$. The product topology $\tau_A \times \tau_B$ on $A \times B$ is generated by the basis
\begin{align*}
\mathcal{B}_1 := \{ (U \cap A) \times (V \cap B) : U \in \tau_X, \; V \in \tau_Y \}.
\end{align*}
[guided]
Recall that the product topology on a product of two spaces is generated by products of open sets, one from each factor. When the factors are $(A, \tau_A)$ and $(B, \tau_B)$, a basis for the product topology is the collection of all sets $W_1 \times W_2$ where $W_1 \in \tau_A$ and $W_2 \in \tau_B$. Since $\tau_A = \{U \cap A : U \in \tau_X\}$ and $\tau_B = \{V \cap B : V \in \tau_Y\}$, every open set in $\tau_A$ (respectively $\tau_B$) is a union of sets of the form $U \cap A$ (respectively $V \cap B$). Therefore the collection
\begin{align*}
\mathcal{B}_1 = \{ (U \cap A) \times (V \cap B) : U \in \tau_X, \; V \in \tau_Y \}
\end{align*}
is a basis for $\tau_A \times \tau_B$. (Strictly: the products of basis elements from each factor form a basis for the product topology.)
[/guided]
[/step]
[step:Identify a basis for the subspace topology $(\tau_X \times \tau_Y)|_{A \times B}$]
The product topology $\tau_X \times \tau_Y$ on $X \times Y$ has basis $\{U \times V : U \in \tau_X, V \in \tau_Y\}$. The subspace topology on $A \times B \subset X \times Y$ has basis
\begin{align*}
\mathcal{B}_2 := \{ (U \times V) \cap (A \times B) : U \in \tau_X, \; V \in \tau_Y \}.
\end{align*}
This follows from the general fact that if $\mathcal{B}$ is a basis for a topology $\tau$ on $Z$ and $S \subset Z$, then $\{W \cap S : W \in \mathcal{B}\}$ is a basis for the subspace topology on $S$.
[guided]
The subspace topology on $A \times B$ inherited from $(X \times Y, \tau_X \times \tau_Y)$ consists of all sets of the form $W \cap (A \times B)$ where $W$ is open in $X \times Y$. A basis for $\tau_X \times \tau_Y$ is $\{U \times V : U \in \tau_X, V \in \tau_Y\}$. When we intersect basis elements with $A \times B$, we obtain a basis for the subspace topology (this is a standard fact: if $\mathcal{B}$ generates $\tau$ and $S \subset Z$, then $\{W \cap S : W \in \mathcal{B}\}$ generates $\tau|_S$, since every open set in $\tau|_S$ is $({\bigcup_\alpha W_\alpha}) \cap S = \bigcup_\alpha (W_\alpha \cap S)$). Therefore
\begin{align*}
\mathcal{B}_2 = \{ (U \times V) \cap (A \times B) : U \in \tau_X, \; V \in \tau_Y \}
\end{align*}
is a basis for $(\tau_X \times \tau_Y)|_{A \times B}$.
[/guided]
[/step]
[step:Show the two bases are equal]
For any $U \in \tau_X$ and $V \in \tau_Y$, the Cartesian product identity gives
\begin{align*}
(U \times V) \cap (A \times B) = (U \cap A) \times (V \cap B).
\end{align*}
To verify: a point $(a, b)$ belongs to the left side if and only if $a \in U$, $b \in V$, $a \in A$, and $b \in B$, which holds if and only if $a \in U \cap A$ and $b \in V \cap B$, i.e., $(a, b) \in (U \cap A) \times (V \cap B)$.
Since this identity holds for all $U \in \tau_X$ and $V \in \tau_Y$, the bases $\mathcal{B}_1$ and $\mathcal{B}_2$ are the same collection of sets. Two topologies with the same basis are equal, so $\tau_A \times \tau_B = (\tau_X \times \tau_Y)|_{A \times B}$.
[/step]