This question (or a close relative) is discussed and answered in https://mathoverflow.net/questions/26385/when-factors-may-be-cancelled-in-homeomorphic-products