Quotient Space and Product

It is known that product topology and quotient space behave not as well as we wish. Nonetheless while I was reading some other posts on MSE, it seems that in some special cases the following claim does hold:

Claim: Let X be a topological space, and $$\sim$$ an equivalence relation on $$X$$. Then $$(X\times I)/\sim'$$ is homeomorphic to the space $$(X/\sim)\times I$$.

Here $$I$$ is the interval $$[0,1]$$ in $$\mathbb {R}$$ and $$\sim'$$ is the equivalence relation on $$(X\times I)$$ defined by $$(x,t)\sim' (x',t')$$ if $$x\sim x'$$ and $$t=t'$$.

I can see that the continuous map $$p\times \textrm{id}:X\times I\rightarrow (X/\sim) \times I$$ induces a continuous bijection from $$(X\times I)/\sim'$$ to $$(X/\sim)\times I$$ (,which is true in more general case). According to what I have found so far it seems that the (local) compactness of $$I$$ is essential in proving that the inverse of the induced map is continuous, but I am stuck here. So my question is

How can one prove the above claim? (And if local compactness is used in the proof, how is it used?)

So you have

$$f:(X\times I)/\sim'\to (X/\sim)\times I$$ $$f([x,t])=([x],t)$$

and (as you've noted) this is a well defined continuous bijection. We can easily find the inverse:

$$g:(X/\sim)\times I\to (X\times I)/\sim'$$ $$g([x], t)=[x,t]$$

and the question is whether $$g$$ is continuous. So pick an open subset $$U\subseteq (X\times I)/\sim'$$ and let $$\pi:X\times I\to (X\times I)/\sim'$$ be the projection. Let $$V:=\pi^{-1}(U)$$. It is obviously open.

Now let $$p:X\to X/\sim$$ be the other projection and let $$\tau:X\times I\to (X/\sim)\times I$$ be given by $$\tau(x,t)=(p(x), t)$$. In other words $$\tau=p\times id$$ in your notation. Note that $$\tau^{-1}(g^{-1}(U))=V$$. Now if we knew that $$\tau$$ is a quotient map then we are done because that would imply that $$g^{-1}(U)$$ is open.

So when is $$\tau$$ a quotient map? For that we need $$I$$ to be locally compact and this is known as

Theorem (Whitehead): Let $$X,Y,Z$$ be topological spaces with $$Z$$ locally compact. If $$f:X\to Y$$ is a quotient map and $$id:Z\to Z$$ is the identity then $$f\times id:X\times Z\to Y\times Z$$ is a quotient map.