  A classical result about unit equations says that if $\Gamma_1$ and
$\Gamma_2$ are finitely generated subgroups of $\mathbb C^\times$, then the
equation $x+y=1$ has only finitely many solutions with $x\in\Gamma_1$ and $y\in
\Gamma_2$. We study a noncommutative analogue of the result, where
$\Gamma_1,\Gamma_2$ are finitely generated subsemigroups of the multiplicative
group of a quaternion algebra. We prove an analogous conclusion when both
semigroups are generated by algebraic quaternions with norms greater than 1 and
one of the semigroups is commutative. As an application in dynamics, we prove
that if $f$ and $g$ are endomorphisms of a curve $C$ of genus $1$ over an
algebraically closed field $k$, and $\mathrm{deg}(f), \mathrm{deg}(g)\geq 2$,
then $f$ and $g$ have a common iterate if and only if some forward orbit of $f$
on $C(k)$ has infinite intersection with an orbit of $g$.
