Connectedness of the spectrum of a tensor product.
Solution 1:
Late edit. The answer is $\mathrm{Spec}(A\otimes_{\mathbb Z}B)$ is always connected.
One reduces to the case $A=B=\mathcal O_F$ for some finite Galois extension $F/\mathbb Q$ as below. Let $G=\mathrm{Gal}(F/\mathbb Q)$. Let $X=\mathrm{Spec}(\mathcal O_F)$ and $S=\mathrm{Spec}(\mathbb Z)$. For any $g\in G$, consider the surjective map $$ \mathcal O_F\otimes_{\mathbb Z}\mathcal O_F\to \mathcal O_F, \quad b\otimes c\mapsto bg(c).$$ It induces a closed immersion $i_g: X\to X\times_S X$. It is not hard to see that the $i_g(X)$, $g\in G$, are the irreducible components of $X\times_S X$, and that $i_g(X)\cap i_h(X)\ne\emptyset$ if (and in fact only if) $gh^{-1}$ belongs to the inertia subgroup $I_x$ of $G$ at some $x\in X$ (if $g=\theta h$ with $\theta\in I_x$, then $i_g(x)=i_h(x)\in i_g(X)\cap i_h(X)$). Using the fact the $I_x$'s, when $x$ varies, generate $G$ ($\mathbb Q$ has no nontrivial unramified extension), we easily get the connectedness.
I don't have a solution, but just some remarks.
It is enough to deal with the case when $A, B$ are ring of integers of number fields $K, L$. Proof: Denote by $X=\mathrm{Spec}(A), Y=\mathrm{Spec}(B)$ and $S=\mathrm{Spec}(\mathbb Z)$. As $X, Y$ are finite over $S$ and are connected, each of their irreducible components $X_1,\dots, X_n, Y_1, \dots, Y_m$ are finite and surjective over $S$. If we can prove that $X_i\times_S Y_j$ is connected for all $i, j$, then simple topological arguments show that $X\times_S Y_j$ is connected. Similary, $X\times_S Y$ is connected. So we are reduced to the case $X, Y$ irreducible. As the connectedness property is purely topological, we can replace $X, Y$ by their maximal reduced subschemes and suppose that they are reduced (hence integral). Let $X', Y'$ be their normalizations. Then $X'\times_S Y'\to X\times_S Y$ is surjective. If $X'\times_S Y'$ is connected, then so is $X\times_S Y$. Therefore it is enough to treat the case when $X, Y$ are integral and normal, so their are defined by ring of integers of number fields.
It is enough to deal with the case $A=B=O_F$ for some finite Galois extension $F/\mathbb Q$. Proof: let $K, L$ be as above, let $F$ be a finite Galois extension containing both $K, L$. Let $Z=\mathrm{Spec}(O_F)$. Then $Z\times_S Z\to X\times_S Y$ is surjective and we are done as in (1).
Let $X=\mathrm{Spec}(O_F)$ with $G=\mathrm{Gal}(F)$. Then $X\times_S X$ splits into union of copies of $X$ parametrized by $G$. This union can be written explicitely. In the very special case where $O_F=\mathbb Z[t]$, we have $X\times_S X=\cup_{\sigma\in G} \mathrm{Spec}(O_F[s]/(s-\sigma(t)))$.
EDIT Two irreducible components $\mathrm{Spec}(O_F[s]/(s-\sigma(t)))$ and $\mathrm{Spec}(O_F[s]/(s-\tau(t)))$ meet at $\mathrm{Spec}(O_F/(\sigma(t)-\tau(t)))$. This intersection is non empty iff $\sigma(t)-\tau(t)$ is not an unit in $O_F$.Suppose $\mathbb {Z}\to O_F$ is totally ramified at some $p$ (e.g $[F:\mathbb Q]$ is prime), then $(X\times_S X)_p$ consist in one point $q$, hence all its irreducible components meet each other at $q$, and $X\times_S X$ is connected.
I tried some explicite examples, all of them are connected. I think it is not too hard to show the connectedness if the Galois group $G$ is $2$-transitive on itself. In general, I don't know whether connectedness holds !