this is fine as an example of an operation that is associative but not commutative. But this does not satisfy what the question demands. Suppose $a,b\in \mathbb{N}$ and $\star$ is the binary operation. You need to define something for: $a\star b$. Using this example of function, how to define $a\star b$? Your example of $f \circ g$ takes only one parameter as input from $\mathbb{N}$ set, but $a\star b$ requires us to take two values $a$ and $b$.