Prove the equality of two concatenations of words
Suppose without loss of generality that $|y'| \geq |x|$. If we write $y' = xa$ then $ax' = y$. The equalities then become


$xau'x' = xuax'$.
$xav'x' = xvax'$.
$xaw'x' = xwax'$.
$xav'u'x' = xuvax'$.
$xaw'v'x' = xvwax'$.


Cancelling $x,x'$, we get


$au' = ua$.
$av' = va$.
$aw' = wa$.
$av'u' = uva$.
$aw'v' = vwa$.


Using $y' = xa$, (5), (1), and $y = ax'$, we get
$$ y'w'v'u'x' = xaw'v'u'x' = xvwau'x' = xvwuax' = xvwuy. $$
This is close to what we want, only we got $vwu$ instead of $uvw$.

Plugging (2) into (4) gives $uva = av'u = vau' = vua$, and so $u$ and $v$ commute. Similarly, plugging (2) into (5) gives $vwa = aw'v' = wav'=wva$, and so $v$ and $w$ commute. The set of words commuting with $v$ forms a commutative monoid (since all are powers of some primitive word), and so $u$ and $w$ also commute. Therefore $vwu = uvw$, completing the proof.