Proving a function is a one way function
The easiest way to construct a probabilistic $A$ is simply, given $z$:


Select a random $w$
Compute $A'(z || f(w))$.
If $A'$ succeeds, then it'll evaluate to an $(x, y)$ pair with $z = f(x)$ and $f(w) = f(x \oplus y)$.
Discard $y$, and return $x$ as $A(z)$.


We select a random $f(w)$, rather than just inserting another copy of $z$, because it is possible that $A'$ would always fail on an input of the form $(z || z)$.  As I have written, if $A'$ succeeds on a nontrivial fraction of its inputs, then $A$ will succeed on the same nontrivial fraction of its inputs.