Let's say that we have morphisms $f:A \to B$ and $g : B \to A$ such that $f \circ g$ and $g \circ f$ are both automorphisms (an automorphism is a morphism that is both iso and endo). Are $f$ and $g$ isomorphisms?
The converse is true. Also they won't necessarily be inverses.
If it is not true in general, which categories is it true for? (It is vacuously true if the category is a groupoid.)
$f\circ g$, being an automorphism, has an inverse $h$. Then $(h\circ f)\circ g$ is the identity, so $g$ has a left inverse and hence is a split monomorphism. Similarly, $g\circ f$ has an inverse $h'$, so $g\circ (f\circ h')$ is the identity, hence $g$ has a right inverse, hence is a split epimorphism. Thus $g$ is an isomorphism. Obviously this is a symmetric argument so the same applies to $f$.