Let $U, V,$ and $W$ be smooth manifolds such that $U\times W$ is diffeomorphic to $V\times W $ does that imply that $U$ is diffeomorphic to $V$.?
Is this result also true/False in other categories like Groups, Topological spaces?
In the case of smooth manifolds, I think this is true by using rank theorem since by rank theorem the map in local coordinates is of the form $(x^1,x^2,...,x^n)\to (x^1,x^2,...,x^n)$ and we can think of $U$ as embedded in $U \times W$ as $U\times \{y\}$ for some $y\in W$ fixed. and similarly, think of $V$ as embedded in $V \times W$ as $V\times \{y\}$.
Using rank theorem we can prove that $U\times \{y\}$ and $V\times \{y\}$ are locally diffeomorphic and use the fact that $U\times W \cong V\times W $ to prove that they are in fact diffeomorphic? Is my approach right? If not where does it fail?
For groups, this implies that the statement is true for finite groups.
I have a small question here if $H\times G \cong K\times G $ then why cant we quotient on both sides $\{e\}\times G$ to get $H\cong K$?
Is the result true for topological spaces?
Is there any classification of Categories in which the result is true?
This doesn't hold if $U,V,W$ are allowed to be disconnected. You can create silly counterexamples in the same way as with infinite groups: take $U = \{0\}$, $V = \{1,2\}$, and $W = \mathbb{Z}$. Then $U\times W \cong \mathbb{Z} \cong V \times W$ as manifolds, but of course $U\not\cong V$. There are obvious higher-dimensional counterexamples of the same nature. (This is similar to $H = \mathbb{Z}$, $K = \mathbb{Z}^2$, $G = \mathbb{Z}^{\mathbb{Z}}$ in groups, or maybe more accurately in free abelian groups.)
As you noted, this question cites this paper which proves the result is true for finite groups, but also that it fails even for $G = \mathbb{Z}$ and $H,K$ finitely presented! It does also hold for finitely generated (but not necessarily finite) abelian groups by the structure theorem, but it does not hold in general for (abelian) groups (see my example above).
As you can see in the paper cited above, it's a little tricky to get a counterexample for $G=\mathbb{Z}$, and I suppose it's also a bit tricky for (closed) connected manifolds, but it looks like Mike Miller knows of one in the comments!