*This question was posted [here][1] on StackExchange and it's still without an answer.*

Let $A$ be a commutative ring and $B,C$ be two commutative $A$-algebras.
Consider the pushout square of ring homomorphism
$\require{AMScd}$
\begin{CD}
A@>\beta>>B\\
@V\gamma VV@VVV\\
C@>>>B\otimes_AC
\end{CD}
In [this][2] answer it is proved that the corresponding commutative square of spectrum $\DeclareMathOperator\Spec{Spec}$
\begin{CD}\tag 1
\Spec(B\otimes_AC)@>>>\Spec(B)\\
@VVV@VV\Spec(\beta)V\\
\Spec(C)@>>\Spec(\gamma)>\Spec(A)
\end{CD}
is a pullback in the category of schemes.

*I'm looking for the conditions under which that square is a pullback in category of sets (or topological spaces) as well.*

This happen in two special cases:

 - if $C=A/\mathfrak a$ for some ideal $\mathfrak a$ of $A$;
 - if $C=S^{-1}A$ for some mutliplicative system $S$ of $A$.

Note that in both case, $A\to C$ is an epimorphism of commutative rings.
> If $A\to C$ is an epimorphism of commutative rings, then $(1)$ is a pullback of sets or topological spaces?

**My try.**
Let $\beta:A\to B$, $\gamma:A\to C$ and $\tau:A\to B\otimes_AC$ and consider the pushout square of commutative rings above.
If $\gamma:A\to C$ is a ring epimorphism, then the right-handed $B\to B\otimes_AC$ is a ring epimorphism as well.
Moreover, it's know that the functions $\Spec(B\otimes_AC)\to\Spec(B)$ and $\Spec(C)\to\Spec(A)$ are injective.
By [Atiyah & MacDonald - ex. 25 pag. 48] we have
$$\operatorname{Im}\Spec(\tau)=\operatorname{Im}\Spec(\beta)\cap\operatorname{Im}\Spec(\gamma)$$
[![enter image description here][3]][3]

This proves the existence of a function $h:X\to\Spec(B\otimes_AC)$ and the injectivity of $\Spec(C)\to\Spec(A)$ implies that the left-handed triangle commutes.
*I've troubles in showing that the upper triangle commutes as well.*


  [1]: https://math.stackexchange.com/q/3333736
  [2]: https://math.stackexchange.com/q/3215844
  [3]: https://i.sstatic.net/ROzkJ.png