This is LaTeX code:

[latex]
\begin{aligned}
 \bigl((f+g)+h\bigr)(s) &= (f+g)(s)h(s) \\
 &= \bigl(f(s)g(s)\bigr)h(s) \\
 &= f(s)\bigl(g(s)h(s)\bigr)\qquad \text{(asocijativnost }G\text{)} \\
 &= f(s)(g+h)(s) \\
 &= \bigl(f+(g+h)\bigr)(s)
\end{aligned}
[/latex]