[guided]To see that equality can fail, we construct a concrete example. Let $X = \mathbb{R}$, let $A = [0, 1]$ carry the subspace topology, and let $B = [0, 1)$.
First, $\operatorname{int}_X(B) = (0, 1)$: any open interval around $0$ in $\mathbb{R}$ extends below $0$ and thus exits $B = [0, 1)$, and any open interval around a point in $[1, \infty)$ exits $B$ as well. So $\operatorname{int}_X(B) \cap A = (0, 1) \cap [0, 1] = (0, 1)$.
Now consider $\operatorname{int}_A(B)$. The point $0$ satisfies $0 \in A$ and $0 \in B$. Choose $U = (-1, 1) \in \tau$. Then $U \cap A = (-1, 1) \cap [0, 1] = [0, 1) = B$, so $0 \in U \cap A \subset B$, confirming $0 \in \operatorname{int}_A(B)$.
Why does the discrepancy occur? In the ambient space $\mathbb{R}$, every open neighbourhood of $0$ must extend to the left of $0$, exiting $B = [0, 1)$. But in the subspace $A = [0, 1]$, points to the left of $0$ do not exist — the intersection with $A$ removes them, leaving $[0, 1)$ open in $A$. This is the fundamental mechanism: the subspace topology can create "new" open sets that are not open in the ambient space.
We conclude $\operatorname{int}_A(B) = [0, 1) \supsetneq (0, 1) = \operatorname{int}_X(B) \cap A$.[/guided]