Throughout, for z=(x,y) and z′=(x′,y′) in X×Y the product metric is dX×Y(z,z′)=max{dX(x,x′),dY(y,y′)}. By the definition of the maximum of two elements of a totally ordered set, for real numbers a,b the value max{a,b} is one of a and b, and a≤max{a,b} and b≤max{a,b}. We use two consequences, for a real number ε:
(M1) If a<ε and b<ε then max{a,b}<ε, because max{a,b} is one of a and b.
(M2) If max{a,b}<ε then a<ε and b<ε, by claim 2 of Elementary Order Arithmetic in an Ordered Field applied to a≤max{a,b} together with max{a,b}<ε, and likewise for b.
Claim 1. Write δm=dX×Y(zm,z)=max{dX(xm,x),dY(ym,y)}.
Suppose first that (zm)m∈N converges to z. Let ε be a real number with 0<ε. By the definition of convergence there is N∈N with δm<ε for every m≥N. By (M2), dX(xm,x)<ε and dY(ym,y)<ε for every m≥N. As ε was arbitrary, (xm)m∈N converges to x in (X,dX) and (ym)m∈N converges to y in (Y,dY).
Conversely, suppose both coordinate sequences converge. Let ε be a real number with 0<ε. There are N1,N2∈N with dX(xm,x)<ε for every m≥N1 and dY(ym,y)<ε for every m≥N2. By claim 3 of Properties of the Order on the Natural Numbers exactly one of N1<N2, N1=N2, N2<N1 holds. In the first case N1≤N2 and in the third N2≤N1, since m<n means m≤n together with m=n; in the second case both N1≤N2 and N2≤N1 hold by reflexivity of the order, which is part of claim 1 of that lemma. So in every case one of N1≤N2 and N2≤N1 holds; let N denote whichever of N1,N2 satisfies N1≤N and N2≤N. Let m≥N. By claim 1 of Properties of the Order on the Natural Numbers the order on N is transitive, so m≥N1 and m≥N2, whence dX(xm,x)<ε and dY(ym,y)<ε, and therefore δm<ε by (M1). As ε was arbitrary, (zm)m∈N converges to z in (X×Y,dX×Y).
Claim 2. Let (zm)m∈N be a sequence in X×Y with zm∈K×M for every m∈N, and write zm=(xm,ym), so that xm∈K and ym∈M for every m.
Then (xm)m∈N is a sequence in X all of whose terms lie in K, so by sequential compactness of K there are x∈K and a strictly increasing sequence (nk)k∈N in N such that (xnk)k∈N converges to x in (X,dX). Next, (ynk)k∈N is a sequence in Y all of whose terms lie in M, so by sequential compactness of M there are y∈M and a strictly increasing sequence (kj)j∈N in N such that (ynkj)j∈N converges to y in (Y,dY).
By claim 2 of A Subsequence of a Subsequence is a Subsequence the sequence (nkj)j∈N is strictly increasing in N, and by claim 3 of that lemma (xnkj)j∈N is a subsequence of (xnk)k∈N. Since (xnk)k∈N converges to x, A Subsequence of a Convergent Sequence Has the Same Limit gives that (xnkj)j∈N converges to x in (X,dX).
So the two coordinate sequences of (znkj)j∈N converge to x and to y respectively, and claim 1 gives that (znkj)j∈N converges to (x,y) in (X×Y,dX×Y). Moreover (x,y)∈K×M, and (nkj)j∈N is strictly increasing, so (znkj)j∈N is a subsequence of (zm)m∈N converging to a point of K×M. As (zm)m∈N was an arbitrary sequence with terms in K×M, the set K×M is sequentially compact in (X×Y,dX×Y).
Claim 3. Let (x,y)∈X×Y and let ε be a real number with 0<ε. Since D is dense in X for TX, the closure of D in X is X, so x belongs to it; by Characterization of the Closure in a Metric Space by Open Balls, condition 1 there implies condition 3, so there is q∈D with dX(x,q)<ε. In the same way there is q′∈E with dY(y,q′)<ε. Then (q,q′)∈D×E and, by (M1),
dX×Y((x,y),(q,q′))=max{dX(x,q),dY(y,q′)}<ε.
As ε was arbitrary, condition 3 of Characterization of the Closure in a Metric Space by Open Balls holds for the subset D×E of X×Y at the point (x,y), so by that theorem (x,y) lies in the closure of D×E in X×Y. Since (x,y) was arbitrary, X×Y is contained in that closure; the closure is a subset of X×Y by definition, so the two sets are equal and D×E is dense in X×Y for TX×Y.
Finally, if D and E are countable then D×E is countable by claim 1 of Products and Powers of Countable Sets.