Let $X$ be a topological space.
Let $\{X_i\}$ be a family of mutually disjoint open subsets of $X$ such that $\bigcup X_i = X$.
Let $a_i$ be a point of $X_i$ for each $i$.
Consider a quotient map $\pi:X\rightarrow X/(a_i,a_j)$.
How do I prove that $X_i\cong \pi(X_i)$?
If it is not true, then what is a counterexample?
The notation is somewhat strange, but I suppose you define an equivalence relation on $X$ defined by $a_i R a_j$ for all $i,j$ and these are the only non-trivial relations, and set $X / R$ as the quotient. So if $x \notin A:= \{a_i : i \in I\}$, then $\pi(x) = \{x\}$, and otherwise $\pi(x) = A$.
$\pi_i := \pi|_{X_i}$ is onto between $X_i$ and $\pi[X_i]$, clearly and continuous as the restriction of the continuous $\pi$.
Also $\pi_i$ is 1-1, for suppose $x \neq y$. $A \cap X_i = \{a_i\}$, so at most one of the points is in $A$. So one or both of them are (distinct if two are not in $A$) singletons, and the other the set $A$. So clearly always different.
And $\pi_i$ is open: suppose $O$ is open in $X_i$. Then $\pi_i^{-1}[\pi_i[O]] = X_i \cap (\pi^{-1}[\pi[O]])$. If $O \cap A = \emptyset$, $\pi^{-1}[\pi[O]]$ equals $O$, otherwise it equals $O \cup A$. But intersected with $X_i$ this is always $O$ in both cases. So $\pi_i[O]$ is open in $X_i$ by definition.