Associative property in particular operation Operation $\circ$ in set $S$ satisfies the conditions:
(1) $\forall x \in S \hspace{0.5cm} x \circ x = x$,
(2) $\forall x,y,z \in S \hspace{0.5cm} (x \circ y) \circ z = (y \circ z) \circ x$
You need to prove that:
$y \circ (x \circ y) = (y \circ x) \circ y$
My friend showed me such proof, but I'm not sure if it's right. (even if it's right, I don't understand why)
$(y \circ y) \circ (x \circ y) = [(x \circ y) \circ y] \circ y = [(y \circ y) \circ x] \circ y = (y \circ x) \circ y$
Can you please explain me, why this "works"? Especially, I want to know, where from come out this part: $(y \circ y) \circ (x \circ y) = [(x \circ y) \circ y] \circ y$
It looks like 2 nd condition of given operation, but I'm not sure.
Also, I'm trying to prove associative property, but I completely have no idea where to start. Can you guve me a hint (I don't want straight answer)?
In general - can you give me some links and/or list books/articles which can be helpful and interesting about operations theory? I would be glad if I can use some kind of problem set with a few solved examples.
Thanks for help
PS: I hope you can understand me.
 A: Yes, $(y \circ y) \circ (x \circ y) = [(x \circ y) \circ y] \circ y$ is your second axiom applied from left to right on the elements $x\circ y$, $y$, and $y$.
Start with the axiom:
$$(x \circ y) \circ z = (y \circ z) \circ x$$
To prevent confusion, rename the variables to $a$, $b$, $c$:
$$(a \circ b) \circ c = (b \circ c) \circ a$$
Flip left and right (since equality is symmetric):
$$(b \circ c) \circ a = (a \circ b) \circ c$$
Substitute $y$ for both $b$ and $c$:
$$(y \circ y) \circ a = (a \circ y) \circ y$$
Finally substitute $x\circ y$ for $a$, and voilà:
$$(y \circ y) \circ (x\circ y) = ((x\circ y) \circ y) \circ y$$
In the next step of the proof a similar rotation happens to $(x\circ y)\circ y$.
A: Let's rewrite property (2) using different letters, 
$$(a \circ b) \circ c = (b \circ c) \circ a  \qquad \forall a,b,c \in S $$ 
Then to prove the identity $y \circ (x \circ y) = (y \circ x) \circ y$, start with lhs:
$$
   (y \circ x) \circ y \stackrel{(1)}{=} (y \circ x) \circ (y \circ y) \stackrel{ (2) \text{, use } c=(y \circ y)}{=} ( ( y \circ x) \circ y) \circ y \stackrel{(2) \text{, with } a=(y\circ x)}{=} (y \circ y) \circ (y \circ x) \stackrel{(1)}{=} y \circ (x \circ y)
$$
