Here is another proof, that actually proves a bit more:
Let $G,H$ be two non-abelian groups of order $6$. Then $G \cong H$.
First off, we seek to show each group has an element of order $3$, and an element of order $2$. Since both are non-abelian, we don't have any elements in either of order $6$, for such an element would then generate the entire group, which would then be cyclic, and thus abelian.
So we only have non-identity elements of orders $2$ and/or $3$. Could all the non-identity elements be order $2$? No, because if $x$ and $y$ were two distinct such elements (in either group), then $xy$ would be a third element, by supposition also of order $2$ (Note $xy \neq e$ since $x \neq y$, and $x,y$ are of order $2$). Since:
$e = (xy)^2 = x^2y^2$, we see $x$ and $y$ commute, and thus $\{e,x,y,xy\}$ is a subgroup of $G$ or $H$ of order $4$. But $4\not\mid 6$, so this is impossible.
On the other hand, it is clear that non-identity elements of order $3$ occur in pairs, so it is impossible to have $5$ such. So $G$ (or $H$) has at least one element (and thus at least $2$) of order $3$, and at least one element of order $2$. Let us call these elements $a,b$ (for $G$, and say $a',b'$ for $H$-in what follows, in your mind "put the primes on" to make corresponding statements for $H$)).
Straight off the bat we know $4$ distinct elements: $e,a,a^2,b$. By closure we see that $ab$ is in the group, and cannot equal any of the four prior elements:
$ab = e \implies b = a^{-1} = a^2\\
ab = a \implies b = e\\
ab = a^2 \implies b = a\\
ab = b \implies a = e$
Similarly, we know that $a^2b$ is also in the group, and a similar process of elimination shows it is distinct from the $5$ given so far.
Now $ba$ must also be in the group, and we have just two possibilities: $ba = ab$, or $ba = a^2b$.
If $ba = ab$, then $(ab)^n = a^nb^n$, and thus $ab$ has order $6$. Since $G$ (and $H$) are non-abelian, this cannot be the case.
Thus $G = \{e,a,a^2,b,ab,a^2b\} = \langle a,b: a^3 = b^2 = e, ba = a^2b\rangle$ and similarly:
$H = \langle a',b': a'^3 = b'^2 = e', b'a' = a'^2b'\rangle$ and $\phi:G \to H$ given by:
$e \mapsto e'\\
a \mapsto a'\\
a^2 \mapsto a'^2\\
b \mapsto b'\\
ab \mapsto a'b'\\
a^2b \mapsto a'^2b'$
is the desired isomorphism (it's clearly bijective, and a homomorphism).
So your particular problem comes down to identifying one element of order $3$ in $D_3$ and one element of order $3$ in $S_3$, and similarly one element of order $2$ in each group, and showing they (the element of order $3$, and the element of order $2$) do not commute. The isomorphism you exhibit is (essentially) the same one as in my post above (and if you look closely enough, actually shows we have thereby $4$ possible automorphisms of any non-abelian group of order $6$ (because we might have $G = H$)).