I'm reading the following to get a high-level overview of categories.
http://en.wikibooks.org/wiki/Haskell/Category_theory
In this, they have this image:
and the author makes this claim:
So which is the morphism $f \circ g?$ The only option is $\mathit{id}_A$. Similarly, we see that $g \circ f = \mathit{id}_B$.
Shouldn't this be the other way around? if $f: B \to A$ and $g: A \to B$ the result of $(f \circ g)(B)$ would be $\mathit{id}_B(B)$ right?

If $f : B \to A$ and $g : A \to B$, then $f \circ g : A \to B \to A$. It's the usual convention for composition, there is nothing wrong here. Reread this line of the book:
Plug in $C = A$ and you find back that $f \circ g : A \to A$, not $B \to B$.
If you want to remember the order: in sets, $(f \circ g)(x)$ is defined to be $f(g(x))$ (easy to remember formula). So if $x \in A$, then $g$ must have domain $A$; and the codomain of $g$ must coincide with the domain of $f$, because $g(x)$ is taken as an input of $f$; finally the output is in the codomain of $f$. If you take all this into account, then $f \circ g$ has the same domain as $g$ and the same codomain as $f$.