Consider a binary operation # that is closed under the set of integers (if a and b are integers, then a#b is an integer).
Assume that, for all integers a and b, it is true that (a#b)#a=b.
Prove that a#(b#a)=b.
Let's define
For a given integer a,
relation R(x) as (a#x), and
relation S(x) as (x#a), and
Also, given (by the original problem):
S is the inverse of R such that applying R, then S will return the original value.
_________________
The original problem is (a#b)#a=b.
This can now be rewritten (by substitution) as:
(a#b)#a = b
(R(b))#a = b
S(R(b)) = b
The key to this problem is that if R is the inverse of S, then S is the inverse of R (definition of inverse).
Therefore, R(S(b)) = b as well !
And this can be rewritten (again by substitution) as:
R(S(b)) = b
a#(S(b)) = b
a#(b#a) = b (which is what we wanted to show!)