I'll use the following slightly reworded version of your posted definition:
Let (M,*) be a monoid and let $M^{\times}$ be the set of invertible elements of $M$.
Define a relation $\mathcal E$ on $M$ by declaring that $a{\;\mathcal E\,}b$ if $u{\,*\,}a = b{\,*\,}u$ for some $u \in M^{\times}$.
The goal is to show that $\mathcal E$ is an equivalence relation on $M$.
For convenience of notation, for $a,b\in M$ we'll write $ab\;$to mean $a{\,*\,}b$.
Let the identity element of $M$ be denoted by $1$.
First we show that $\mathcal E$ is reflexive.
Let $a\in M$.
Then $ua=au$ holds using $u=1$, hence $a{\;\mathcal E\,}a$.
It follows that $\mathcal E$ is reflexive.
Next we show that $\mathcal E$ is symmetric.
Let $a,b\in M$ and suppose $a{\;\mathcal E\,}b$.
Let $u\in M^\times$ be such that $ua=bu$.
Let $u'\in M^{\times}$ be such that $uu'=1=u'u$.
Then we get
$$
u'b
=
(u'b)(uu')
=
u'(bu)u'
=
u'(ua)u'
=
(u'u)(au')
=
au'
$$
hence $b{\;\mathcal E\,}a$.
It follows that $\mathcal E$ is symmetric.
Finally we show that $\mathcal E$ is transitive.
Let $a,b,c\in M$ and suppose $a{\;\mathcal E\,}b$ and $b{\;\mathcal E\,}c$.
Let $u,v\in M^\times$ be such that $ua=bu$ and $vb=cv$
Let $u',v'\in M^{\times}$ be such that $uu'=1=u'u$ and $vv'=1=v'v$.
Let $w=vu$ and let $w'=u'v'$.
Then $w\in M^{\times}$ since
$$
\left\lbrace
\begin{align*}
ww'&=(vu)(u'v')=v(uu')v'=vv'=1
\\[4pt]
w'w&=(u'v')(vu)=u'(v'v)u=u'u=1
\\[4pt]
\end{align*}
\right.
$$
Then we get
$$
wa
=
(vu)a
=
v(ua)
=
v(bu)
=
(vb)u
=
(cv)u
=
c(vu)
=
cw
$$
hence $a{\;\mathcal E\,}c$.
It follows that $\mathcal E$ is transitive.
Therefore $\mathcal E$ is an equivalence relation.