Let $(G,\circ)$ be a group with identity $e$. We want to solve for $f$ in the functional equation $$f(x,y)\circ f(y,x)=e\qquad \forall x,y \in G$$
A trivial solution is $f(x,y) := e$. Working backwards from known examples for $(\mathbb R, +)$ and $(\mathbb R_+, \cdot)$, I see that two possible solutions are: $$ f(x,y) := x \circ y^{-1}$$ and $$ f(x,y) := y \circ x^{-1}$$
Are there any other solutions, or can it be shown that these are the only two non-trivial solutions?
Let $f\colon X\times X\to G$ where $X$ is an arbitrary non-empty set. Define an equivalence relation $\sim$ on $X\times X$ by $(x,y)\sim (u,v)$ iff $\{ x,y\}=\{u,v\}$, Then the equivalence classes are of the form $\{(x,x)\}$ or of the form $\{(x,y),(y,x)\}$ with $x\not=y$. Then all functions $f$ such that $f(x,x)\circ f(x,x)=e$ for all $x$ and $f(x,y)\circ f(y,x)=e$ for all $x\not=y$ have the desired property. Thus you may define $f$ according to these rules on the equivalence classes. But there is no need to have relations between different classes.