The nicest way to do this if we restrict our attention to positive integers is to take something similar to Zander's answer... but work with prime powers. It should be able to be extended to positive rationals, if you're careful.
It works like this: if you have two integers of the form
$$
a = \prod_{i=1}^n p_i^{k_i}
$$
and
$$
b = \prod_{i=1}^n p_i^{m_i}
$$
where $n$ is simply the index of the highest prime present in the pair of integers (that is, it's an arbitrary number for representing the primes in question), then we define our operation as
$$
a\circ b = \prod_{i=1}^n p_i^{k_i\times m_i}
$$
With this operation, we have commutativity (obvious). We have associativity:
$$
(a\circ b)\circ c = a\circ (b\circ c) = \prod_{i=1}^n p_i^{k_i\times m_i\times l_i}
$$
We have distributivity:
$$
a\circ (b\times c) = \prod_{i=1}^n p_i^{k_i\times (m_i+l_i)} = \prod_{i=1}^n p_i^{k_i\times m_i}\times \prod_{i=1}^n p_i^{k_i\times l_i}
$$
(and similarly for the right-distributivity).
Interestingly, this operation maps any pair of coprime integers to one, and more generally the result of this operation on any pair of integers will produce an integer having only prime factors present in both the original integers. Some specific examples...
$$
p^m \circ p^n = p^{mn}\\
100\circ 750 = 62500\\
224\circ 147 = 49
$$
To prove it is the unique solution, you need to prove two things:
Your solution is a solution, i.e. you do indeed need to show that your solution is associative, that $e$ is indeed the identity element, and that every element has an inverse.
There are no other solutions.
Now, to show that there are no other solutions, you would go through an argument like:
$e$ being the identity element immediately forces 5 of the 9 values in the table:
\begin{array}{|c|c|c|c|c|c|}
\hline
*& e & a & b \\ \hline
e& e&a &b\\ \hline
a& a& &\\ \hline
b& b & &\\ \hline
\end{array}
$a$ has an inverse element, i.e. there is some element $a^{-1}$ such that $a * a^{-1} = e$, so $a^{-1} \not = e$, since $a * e = a$ and $a \not = e$.
Now, if $a^{-1} = a$ is inverse of $a$, then $aa=e$, so $(b * a) * a = b * (a * a) = b * e = b$, and so $b * a = b$, since if $b * a = e$ then $(b * a) * a = e * a = a \not = b$, and if $b * a = a$ then $(b * a) * a = a * a = e \not = b$. But since $b$ has to have an inverse $b^{-1}$ such that $b * b^{-1} = e$, and since $b * e = b \not = e$, and $b * a = b \not = e$, that means that $b^{-1} = b$. But then $(a * b) * b = b * b = e$,while $a * (b * b) = a * e= a$, and so $*$ is not associative. Hence, we have a contradiction if $a^{-1}= a$, and hence the only way things can work is if $a^{-1}= b$, i.e. $a * b = e$
\begin{array}{|c|c|c|c|c|c|}
\hline
*& e & a & b \\ \hline
e& e&a &b\\ \hline
a& a& &e\\ \hline
b& b & &\\ \hline
\end{array}
But this means that $a*a = b$, for we have $(a*a)*b = a * (a * b) = a * e = a$, and if $a*a = e$ then $(a * a) * b = e * b = b \not = a$, and if $a * a = a$ then $(a * a) * b = a * b = e \not = a$.
\begin{array}{|c|c|c|c|c|c|}
\hline
*& e & a & b \\ \hline
e& e&a &b\\ \hline
a& a& b&e\\ \hline
b& b & &\\ \hline
\end{array}
Also, since $a * (b * a) = (a * b) * a = e * a = a$, we get that $b * a = e$, for if $b * a = a$ then $a * (b * a) = a * a = e \not = a$, and if $b * a = b$, then $a * (b * a) = a * b = e \not = a$.
\begin{array}{|c|c|c|c|c|c|}
\hline
*& e & a & b \\ \hline
e& e&a &b\\ \hline
a& a& b&e\\ \hline
b& b & e&\\ \hline
\end{array}
And finally, since $a * (b * b) = (a * b) * b = e * b = b$, it must be that $b * b = a$, for if $b * b = e$, then $a * (b * b) = a * e = a \not = b$, and if $b * b = b$, then $a * (b * b) = a * b = e \not = b$
\begin{array}{|c|c|c|c|c|c|}
\hline
*& e & a & b \\ \hline
e& e&a &b\\ \hline
a& a& b&e\\ \hline
b& b & e&a\\ \hline
\end{array}
OK, so what we have now established is that there cannot be more than 1 solution.
But we have not yet established that this actually is a solution!
That is, if you look back at the proof, you see that we rules out all kinds of values, but we never established that the values that were forced actually did satisfy the requirements!
So, yes, you need to show that $e$ works like an identity element (easy), that ever element has an inverse (easy), and that this $*$ is associative (not hard, but tedious)
Best Answer
Commutative means $a*b = b*a$.
Associative means $a*(b*c) = (a*b)*c$.
A unity element $e$ is one such that $a*e = a$ for all $a$ (this is a right unity - a left unity is defined similarly).
So, put these definitions into your operator definitions and see which holds and which do not. For the unity, see what properties the unity element must have.